I get to the Database configuration screen:

Failed to connect to your MySQL database server. MySQL reports the following message: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

I have the right info for the database and the user has permission. Restarted MySQL, didn't help.

Comments

ryank76’s picture

Using php 5.2.13 and mysql 14.14 distrib 5.0.83.

ryank76’s picture

OK so finding this thread http://ubuntuforums.org/showthread.php?t=597129

I put '127.0.0.1' instead of 'localhost' in the Database host field under Advanced Options. That worked.

David_Rothstein’s picture

Hm, on most setups "localhost" should work - do you know if there is anything special about your server setup that makes it so it doesn't?

In the current user interface, we put 'localhost' as the default value and "If your database is located on a different server, change this" as the help text, which is not very helpful for the situation you encountered. Maybe if it's a common situation that 'localhost' does not work, we need to change that text somehow.

ryank76’s picture

Nothing special, it's LAMP from the Ubuntu repositories for version 9.10. The only tweak I've done (that I remember :s) is the one to enable clean URLs.

I'm a n00b really (as you can probably tell) so I wouldn't know how to fiddle with it if I tried, which I generally don't unless instructed.

pjcdawkins’s picture

Category: bug » support

I vaguely recall encountering something similar before, but it wasn't a Drupal-specific problem. The best answers might be here:
http://dev.mysql.com/doc/refman/5.5/en/can-not-connect-to-server.html

pasqualle’s picture

Component: install system » database system
Issue summary: View changes
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.