ot error: 1045: Access denied for user 'root'@'localhost'

When I try to:
mysqlcheck --all-databases -r #check
mysqlcheck --all-databases -r #repair
mysqlcheck --all-databases -a #analyze
mysqlcheck --all-databases -o #optimize

This appears:
mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

How can I fix it?


  • Unable to access to PHPMyAdmin with root access too: mysqli_real_connect(): (HY000/2002): Connection refused
  • mysql -u root -p;
    Enter password:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused")

    And chose the password from: cat /etc/cyberpanel/mysqlPassword
Sign In or Register to comment.
Support CyberPanel CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion