I am attempting to update a Drupal website and the associated modules with drush 7. The MySQL database resides on another server within the same network. When attempting to run any command where drush would connect with the MySQL database the following error is returned:

Command pm-list needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.

Running drush pml --debug I see that drush appears to be reading the correct database credentials:

Executing: mysql --defaults-extra-file=/tmp/drush_EDQIvN --database=dlc_ode --host=correct.internal.ip.address --silent < /tmp/drush_ltZVnl

But on the line just below:

ERROR 1045 (28000): Access denied for user 'root'@'ip-ip.of.localhost.us-west-2.compute.internal' (using password: YES)

Neither the user root nor the AWS domain is correct. I am new to drush and am not certain what is overriding the database credentials in the settings.php file.

I can connect with MySQL from the command line with no problem using mysql -u username -p. Drupal itself connects fine.

Any suggestions of what I am overlooking will be appreciated.

Thank you.

1 Answer 1


Occurred to me right after I posted my question to check whether someone had created another my.conf or .my.conf file on the system at sometime in the past. And yes there was a .my.conf file that had been created some years ago. Renamed the file and viola, drush pml works as expected.

Hopes this helps someone puzzled by incorrect database connection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.