DEV Community

Cover image for HOW TO SLOW "(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"
NAVID MANSURI
NAVID MANSURI

Posted on

HOW TO SLOW "(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)"

If none of the other answers work for you, and you received this error:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter fullscreen mode Exit fullscreen mode

1 Stop Your Server First

$ sudo service mysql stop
Enter fullscreen mode Exit fullscreen mode

2 Make MySQL service directory.

$ sudo mkdir /var/run/mysqld
Enter fullscreen mode Exit fullscreen mode

3 Give MySQL permission to work with the created directory.

$ sudo chown mysql: /var/run/mysqld
Enter fullscreen mode Exit fullscreen mode

4 Start MySQL, without permission and network checking.

$ sudo mysqld_safe --skip-grant-tables --skip-networking &
Enter fullscreen mode Exit fullscreen mode

5 Log in to your server without any password.

$ mysql -u root mysql
or
$ sudo mysql -u root mysql
Enter fullscreen mode Exit fullscreen mode

THANKS 😃

Top comments (0)