Question

Problem with secure MySQL installation on new droplet

Posted January 9, 2014 4.9k views
Hi, I just spun up a new droplet with a pre-config Ubuntu LAMP stack, then logged in as root fine. Changed root passwd and ran the following. apt-get update mysql_install_db mysql_secure_installation After entering the root password I get the following message: Enter current password for root (enter for none): ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) This has never happened before on any droplet I have created and used. Any pointers much appreciated. Thanks in advance.

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.

×
4 answers
OK, managed to get in by doing the following:

mysql -u debian-sys-maint -p

update user set password=password('yourpassword') where user='root';
flush privileges;
exit

Still not sure why there was a problem originally. Is this an issue with droplet creation script at DO end?
Just in case anyone else is getting the same issue debian-sys-maint password can be found by issuing this command:

cat /etc/mysql/debian.cnf
Hmm, maybe I installed my LAMP stack manually before, but never once had this error message. Thx for the pointer though.
Submit an Answer