Page 1 of 1

MYSQL won't start

Posted: Tue Jan 06, 2015 6:47 pm
by Barry
Hello. I think my zoneminder version is 1.28, but I'm not positive.... How do I check?

Going to my zoneminder page show this :
Could not connect to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
Attempting to start mysql(d):

Code: Select all

root@mfs-cameraserver:/var/log# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

Code: Select all

root@mfs-cameraserver:/var/log# mysqld
150106 11:43:22 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
I tried the database repair on the FAQ, but it didn't help. http://www.zoneminder.com/wiki/index.ph ... atabase.3F

Any help is appreciated.
Cheers.

Re: MYSQL won't start

Posted: Thu Jan 08, 2015 12:59 pm
by chippy99
What distribution are you running ?
Also what is returned if you type

Code: Select all

ps ax | grep mysql

Re: MYSQL won't start

Posted: Thu Jan 08, 2015 3:36 pm
by Barry
Thanks for the reply. I got it sorted out. I'd post the link, but the forum won't let me. Google "How to Recover InnoDB Corruption for MySQL". The gist of it is I used the innodb_force_recovery tag in my.cnf. That allowed me to at least start the database and log into it. So then I did this

Code: Select all

mysqldump –all-databases > all_the_bases.sql
Then

Code: Select all

mkdir /var/lib/old_innodb_data/

mv /var/lib/mysql/ib* /var/lib/old_innodb_data
Removed the innodb_force_recovery tag, started the database back up and ran the .sql script. Back in business.

Cheers.

Re: MYSQL won't start

Posted: Fri Jan 09, 2015 1:48 am
by chippy99
Ok, good to hear you are now up and running.