I am having a database connection error

Every 3 or 4 days MySQL server stops running and I have to restart it.

I found this error: DBI connect failed : Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Not sure how to go about fixing this.

Perhaps try this solution…


Or there are a whole heap of alternative fixes on stackoverflow…


Check your mysql error log for the exact problem. Try in /var/log or check your /etc/my.cnf.