MySQL not starting – unknown variable table_cache

Table open cache mysql upgrade errorI’ve upgraded my dev server to latest version of Debian. Everything was going smoothly until I’ve got an error from mysql-server that it cannot be installed due to an error. I checked few websites that I have there running and all of them were down. Checked the logs but nothing obvious was there, eventually I realised the MySQL process was not running at all which was understandable considering the previous failure to install myslq server. So this was my error:

[ERROR] mysqld: unknown variable 'table_cache=64'
[ERROR] Aborting

After that all I had to do is update the var name in /etc/mysql/my.cnf  to its new name: table_open_cache and rerun the previous installation.

So what happened there is in version 5.1.3 the table_cache system variable was renamed to table_open_cache. Any scripts that refer to table_cache should’ve been updated to use the new name. However, it did not become an error until years later, in 5.7.6. Change to table_open_cache.


Just a guy with strong interest in PHP and Web technologies

Tagged with: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.