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

3 1

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)

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay