Page 1 of 1

could not connect to database sql error,

Posted: Sat Jul 28, 2007 2:29 pm
by TimboUK
Help!
Been away for 2 weeks and now i tried to login (latest version) and all I get is the browser window saying cannot connect to the sql server....

Any idea whats happened. I dont want to have to reinstall everything again!

BTW total linux noob too; sorry!


I thought my disc may have filled up, but its listed as a 59gig, using 52gig. So theres free space there. Now I am at a loss!

Re: could not connect to database sql error,

Posted: Sat Jul 28, 2007 5:38 pm
by TimboUK
TimboUK wrote:Help!
Been away for 2 weeks and now i tried to login (latest version) and all I get is the browser window saying cannot connect to the sql server....

Any idea whats happened. I dont want to have to reinstall everything again!

BTW total linux noob too; sorry!

I thought my disc may have filled up, but its listed as a 59gig, using 52gig. So theres free space there. Now I am at a loss!
Forgot to add the full error message:

Could not connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


Has anyone any suggestions please, I am totally stuck.

Posted: Sat Jul 28, 2007 7:28 pm
by cordel
Have you checked the logs, more specifically the mysql and messages log to see why it might have stopped?

Posted: Sun Jul 29, 2007 1:53 pm
by TimboUK
cordel wrote:Have you checked the logs, more specifically the mysql and messages log to see why it might have stopped?
sorry cordel, I am not sure where to look. I have looked in the FAQ and cannot find this error.

Posted: Sun Jul 29, 2007 7:02 pm
by Lee Sharp
post the output of this command.

Code: Select all

sudo /etc/init.d/mysql restart

Posted: Mon Jul 30, 2007 6:57 am
by TimboUK
[guest ~]$ sudo /etc/init.d/mysql restart
sudo: /etc/init.d/mysql: command not found
[guest ~]$

Does that mean the SQL database is not running?

Posted: Mon Jul 30, 2007 5:32 pm
by Lee Sharp
That is the base script to start mysql. The run level directories have links to that script to start mysql, so if it is missing... Check the path to be sure. That is the path for Ubuntu and other debian based distributions. If the path is right, and the startup script is missing, I think we found your problem.