plesk won’t start after tweaking mysql

Posted by jon on 13 August, 2007
This post was filed in MySQL and has

i’ve had this happen to me again the other week and as always, felt like kicking myself for not remembering.

we do a lot of performance tuning on mysql, and as a result, we almost always manage to get plesk mangled. not its fault, it just can’t run without mysql, doh.

not of preference, but plesk happens to be there to make handling domains easier, as a single editing point when you want to change something and not worry about missing something out.

so there’s a custom /etc/my.cnf that we use, and with changes to limits done (both on mysql and via ulimit), you’d think that a reload of mysqld would do. (we use InnoDB btw)

normally, that’s all you need to have mysqld read off the new settings. if you’ve grown so dependent on plesk (like i have), you would not notice that mysqld didn’t actually start, and you will get an error when you load plesk, thinking that it’s a plesk error:


ERROR: PleskMainDBException
MySQL query failed: Incorrect information in file: ‘./psa/misc.frm’

0: /usr/local/psa/admin/plib/common_func.php3:218
db_query(string ’select param, val from misc’)
1: /usr/local/psa/admin/plib/common_func.php3:497
get_param(string ‘mysql41_compatible’)
2: /usr/local/psa/admin/plib/common_func.php3:394
db_set_names()
3: /usr/local/psa/admin/plib/common_func.php3:373
db_connect_real(string ‘localhost’, string ‘admin’, string ‘********’, string ‘psa’)
4: /usr/local/psa/admin/plib/common_func.php3:353
db_connect()
5: /usr/local/psa/admin/auto_prepend/auth.php3:82

even a restart of the plesk service will not work:


[root@jedi]# /etc/init.d/psa restart
Unable to query parameter by query select val from misc where param=’mysql41_compatible’: Incorrect information in file: ‘./psa/misc.frm’
Unable to query parameter by query select val from misc where param=’mysql41_compatible’: Incorrect information in file: ‘./psa/misc.frm’
Mysql error: Incorrect information in file: ‘./psa/key_history.frm’
Processing config directory: /usr/local/psa/admin/conf/httpsd.*.include
Syntax OK
/usr/local/psa/admin/bin/httpsdctl restart: httpd restarted
ERROR 1033 (HY000) at line 1: Incorrect information in file: ‘./psa/sessions.frm’

so this is a mysqld failing to start properly problem. to fix this, go to your mysql datadir and see if the sizes of your innodb log files match those in your .cnf. we usually set innodb_log_file_size = 256M and innodb_log_buffer_size = 256M in /etc/my.cnf.

if they don’t match, stop mysqld, remove the ib_logfile0 and ib_logfile1 files, and start mysqld. be careful not to delete the ibdata1 or ibdata2 files or you lose your data. avoid using rm -r ib* (yea, wildcards and fast fingers give sysads their most stupefying moments)

innodb will recreate the log files to match your .cnf and mysqld now becomes available for plesk.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

4 Comments on “plesk won’t start after tweaking mysql”

  • ecropolan
    17 January, 2008, 18:27

    My logs were not recreated. I added the lines specifying the log file size to the my.cnf file because they weren’t even there at all.

    MySql did restart on the 4th try. I got back up with plesk by restoring a dump file.

    But those logs are still missing and I think that’s causing a delay when I try to start or restart the server.

    Any ideas? I’m on the latest 8.2 version of Plesk

  • Montoya
    19 January, 2008, 17:55

    Wow, that solved the problem. Thanks so much!

  • Jon
    21 January, 2008, 16:00

    @ecropolan: what kind of tables do you use? (sorry, had to make sure we’re talking about innodb). can you paste here tail entries of your mysql.err?

    @montoya: glad i got to help!

  • Anonymous
    25 January, 2008, 8:26

    We deactivated innodb in the my.cnf to free the RAM, but it seems that Plesk needs it. :-(

Leave a Comment