I tried to follow this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu To install the MYSQL database, but when I get to the command “sudo /usr/bin/mysql_secure_installation” and I try to enter my root password of the server, it keeps on tell me I have the wrong password. The error message is as below:
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
I am sure the password I entered is correct. Any one can provide some help here?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
If you still have this problem, try resetting your password using the following steps.
Stop the MySQL Server. On your terminal run these commands:
Then start the mysqld configuration. enter this command
Login to MySQL as root.
Replace YOURNEWPASSWORD with your new password!
See if it works. *NOT A VERY SECURE METHOD OF CHANGING/RESETTING PASSWORDS BUT IT SHOULD WORKS
This comment has been deleted
i followed the steps mentioned above but it does not work, i keep getting this error **ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ **
MySQL root password is not the same as the server root password.