"Failed to connect to your MySQL database server. MySQL reports the following message: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2).
* Are you sure you have the correct username and password?
* Are you sure that you have typed the correct database hostname?
* Are you sure that the database server is running?
For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider."
Umm, what? I can't find info on this error message anywhere. No idea what I'm doing. But I did create a My SQL database via the nice interface with my host, and then plugged in all the info drupal asked for. And it obviously doesn't work. What did I do wrong?
pookiepid
2 years 1 week ago
Check your database in your control panel and make sure it is there.
Sometimes the hosting provider will prepend a username onto the database to track them by user. If they did this, it should be obvious when you look at the database info in the control panel/interface your host gives you.
Try to access the database via PHPMyAdmin if they give you that tool.
I just ran into the same problem (I think), and thanks to your question, was able to find a solution.
I installed mysql manually, and my socket is nonstandard (it's not the /var/run/mysqld/mysqld.sock that php is looking for). In /etc/mysql/my.cnf my socket = /tmp/mysql.sock
Since someone mentioned this problem is likely between php and mysql, I looked at my /etc/php5/apache2/php.ini and changed all of the sockets to the one my mysql instance uses:
mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = /tmp/mysql.sock
It worked after that change (I restarted the apache server as well).
-theconfusedone