could not connect to database sql error,

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

could not connect to database sql error,

Post by TimboUK » Sat Jul 28, 2007 2:29 pm

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 » Sat Jul 28, 2007 5:38 pm

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
Contact:

Post by cordel » Sat Jul 28, 2007 7:28 pm

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 » Sun Jul 29, 2007 1:53 pm

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 » Sun Jul 29, 2007 7:02 pm

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 » Mon Jul 30, 2007 6:57 am

[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 » Mon Jul 30, 2007 5:32 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests