How to Restart MySQL After Editing innodb Log Size

Sometimes, either because we’ve got a puny amount of RAM available, or because we’ve recently boosted available RAM, we want to allow MySQL a different amount of memory for it’s innodb logs.

However, when we change this, restarting MySQLd can cause a hiccup or two. Namely, the MySQL service won’t restart. If this happens, what you need to do is stop MySQL(d); remove the pre-existing logs; and then start MySQL(d) and you’ll find that the new logs are then created (in their new size!).

The following code may work, depending on your setup!

sudo -i
service mysqld stop
rm -f /var/lib/mysql/ib_logfile[01]
service mysqld start

Leave a comment below if this didn’t work for you. Please do describe your setup. I might not always be able to help, but someone here might be!

Leave a comment

No links of any kind allowed in comments - if you add any links, your comment will automatically be deleted.