here's the error message:

The MySQLi error message was:

"Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)."

here's the url: http://bang-on.com

i have no idea what this means but a friend of mine is kinda freaking out.

oh good community, please help!

Update: it did work before. what sorts of things would lead to MYSQL stopping running and how would i go about getting it back up? Thanks so much!

  • 1
    Did you try to copy the error message and paste it to google, bing, or whatever? – Zed Aug 17 '09 at 20:53
  • 1
    JFGI comments are usually not well accepted on S[OUF] sites. – EBGreen Aug 17 '09 at 21:01

From here : http://answers.yahoo.com/question/index?qid=20080815175416AAN41y6

First you need to find out where the mysqld.sock file is being created. Once you have all you need to do is create a symlink to the location of your socket in /var/run/mysqld/.

ln -s [path to your mysqld.sock file] /var/run/mysqld/mysqld/mysqld.sock

I am unsure where your mysqld.sock file is located since it changes from system to system.

You could also change the path of the sock file when mysqld starts but this could break other things.

from here: http://drupal.org/node/73103

in your drupal folder (already on your server) update your /sites/default/settings.php file where $db_url = 'pgsql://username:password@localhost/databasename'; change to: $db_url = 'pgsql://username:password@example.com/databasename';

Hope that helps


Sounds like Mysql died. There can be lots of reasons why. Take a look at the mysqld log file, probably in /var/log or /var/log/mysql, and see what's up. Take a look at /var/log/messages too and look for any weirdness also.

As for restarting it, that depends on your distro. Most Redhat based distros use something along the lines of "service mysql start".

You don't provide much info so it's hard to provide a real diagnosis.


The most frequent reason for this is a dead MySQL server process, as David suggested.

For non-Redhat distros, the typical restart command is /etc/init.d/mysql restart

Once the server restarts, you'll likely want to do a DB check using:

mysqlcheck -A -u -p --repair --extended --optimize --check-only-changed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy