If you're having an issue where Drush gets access denied for the database whenever you try to run a command, try running drush sql-connect
. Doing so will return a mysql
command line string you can paste to try to connect manually.
Paste that mysql
command and run it. If that works fine, but Drush gets "access denied" when you try other commands such as drush sql-console
, then see if there's a ~/.my.cnf
file.
Sometimes, that file will hide itself away in the home directory and quiety do things like override passwords you pass in, etc. Check it out, and delete it if it's not helping you, then try again.
Found this answer here: http://drupal.stackexchange.com/a/125630/652