Question

Problem with secure MySQL installation on new droplet

  • Posted January 9, 2014

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.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hmm, maybe I installed my LAMP stack manually before, but never once had this error message. Thx for the pointer though.

Check out <a href=“https://www.digitalocean.com/community/questions/lamp-stack-password”>LAMP Stack password</a>.

Just in case anyone else is getting the same issue debian-sys-maint password can be found by issuing this command: <br> <br>cat /etc/mysql/debian.cnf

OK, managed to get in by doing the following: <br> <br>mysql -u debian-sys-maint -p <br> <br>update user set password=password(‘yourpassword’) where user=‘root’; <br>flush privileges; <br>exit <br> <br>Still not sure why there was a problem originally. Is this an issue with droplet creation script at DO end?