could not connect to database sql error,

Support and queries relating to all previous versions of ZoneMinder
Locked
TimboUK
Posts: 40
Joined: Sun Oct 29, 2006 9:06 pm

could not connect to database sql error,

Post 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!
TimboUK
Posts: 40
Joined: Sun Oct 29, 2006 9:06 pm

Re: could not connect to database sql error,

Post 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.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Have you checked the logs, more specifically the mysql and messages log to see why it might have stopped?
TimboUK
Posts: 40
Joined: Sun Oct 29, 2006 9:06 pm

Post 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.
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

post the output of this command.

Code: Select all

sudo /etc/init.d/mysql restart
TimboUK
Posts: 40
Joined: Sun Oct 29, 2006 9:06 pm

Post 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?
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post 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.
Locked