LEMP one-click app -- what's the default MySQL password?

  • Posted December 24, 2015
  • LEMP

I can’t access MySQL as root. What’s the default pass for root?


In MySQL 5.7, the default way to install causes an initial password for the root account to be generated randomly. This password is logged to the MySQL error log, so look for it there. This initial password is marked as “expired” so you must change it as soon as you log in the first time.

Read Initializing the Data Directory Manually Using mysqld for more information.

In MySQL 5.6 or earlier, the initial password for the root account is empty.

Thanks! Morpheus TV

The MySQL root password is being randomly generated by your server if you use a one-click app install. You need to check your app configuration to find the password, or you need to change your root pass and edit the configuration afterwards with the new pass.

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.

Hey there,

As @CrypticDesigns mentioned, the password for the MySQL root account is displayed in the message of the day when you first log in via SSH. You can also reset the MySQL root password with these steps.

Happy coding,

Jon Schwenn Platform Support Specialist DigitalOcean

Just installed a one click LEMP 2 days ago. It’s different now. It still says in the welcome message at system login:

"The MySQL root password is saved in /root/.digitalocean_password"

the file is still there and contains a password, but no actual password is set for ‘root’ mysql user. Instead, the user is configured with auth_socket plugin, which means that only unix socket connections are allowed, and only from the local unix user ‘root’

This comment has been deleted

This comment has been deleted

This comment has been deleted

This comment has been deleted

This comment has been deleted

This comment has been deleted