What is the root password of the mysql server in a DigitalOcean Drupal install?

December 18, 2014 2.3k views

After a fresh Drupal droplet, what is the password of the MySQL admin? I tried mysql_ secure_ installation, but no passwords match (not the one for the shell, not the drupal password, not empty) so what is it? Or how can I reset it?

1 comment
  • So, you have to set it in the terminal. the first time you run the mysql cli it will log in on it's own, you can set it there. When it's not set, you can set it with the mysqladmin command: mysqladmin -root password THISISYOURNEWPASS I resent three droplets before I figured this out.

3 Answers

On the Drupal One-Click application the root MySql password can be found in the file /root/.my.cnf This should allow you to log in with the root user without having to enter a password with mysql -u root

There seems to be no password needed mysql when you are logged in as root.

However, there is a mysql user "drupal" with a password that you can find in the Drupal default installation at /var/www/html/drupal/sites/default/settings.php around line 222 on Drupal 7.34

Have another answer? Share your knowledge.