DEV Community

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

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

NAVID MANSURI
i am navid mansuri from gujarat in ahmdabad..and student also
・1 min read

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 😃

Discussion (0)