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.

It's only fair to share...Buffer this pageShare on Facebook0Tweet about this on TwitterShare on Google+0Share on LinkedIn0Share on Reddit0Pin on Pinterest0Email this to someone
About

Just a guy with strong interest in PHP and Web technologies

Posted in Servers, Unix Tagged with: , , ,

Leave a Reply

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

*