Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change MySQL error log file format

I am running a shared hosting LAMP server. I have several clients using the same CMS software, which utilizes MySQL as the back-end database. I am getting a 145 error in my /var/log/mysqld.log regarding the mod_statistics.MYI file:

120713 8:53:22 [ERROR] /usr/libexec/mysqld: Can't open file: 'mod_statistics.MYI' (errno: 145)

I know how to fix the 145 error: that's not the issue. However, FINDING the correct mod_statistics.MYI is the problem for me, since there are a LOT of clients on this server who have their own copies of this table.

My question: How can the MySQL logging format be modified to add the full path of this file to the log output? I really hate to have to go through each customer loading this table to see if it's corrupted.

I have Googled and read the MySQL log file documentation, which doesn't discuss changing the file format.

THANK YOU!

Ryan

like image 402
Ryan Griggs Avatar asked Nov 04 '22 20:11

Ryan Griggs


1 Answers

It doesn't look like its possible to format the MySQL error log.

One possible solution to this is to use the MyISAM auto-recovery mode when you start the server: http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_myisam-recover. The description makes it sound like it gives more info about the table(s) that it's working on.

It might help to locate the table and it might get it fixed for you.

like image 139
ethrbunny Avatar answered Nov 07 '22 20:11

ethrbunny