When trying to install a new drupal with

drush si standard --db-url=mysql://root@localhost/drushtest

I get the following error Message:

[...] SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket [...]

MySQL User is root with no password and the database drushtest was already created. I'm using Ubuntu with Xampp and guessing that the incorrect mysql.sock is used.

ps -ax|grep mysql

says that my mysql.sock lies within


Has somebody a clue how to solve this error?

Thanks in advance

  • 3
    Try using in place of localhost – Clive Feb 17 '14 at 11:13
  • Weird. Same problem, same solution. Any explanation for this, @Clive? – Koen Oct 8 '16 at 20:59

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.