3

I use Mamp Pro 3. I upgraded Mamp's MySql to 5.6.24 using this script https://gist.github.com/tobi-pb/b9426db51f262d88515c.

After that I ran the Mamp Pro and MySql cannot be started. So I looked the mysql_error.log and found the following error:

2015-06-15 01:24:55 13139 [ERROR] /Applications/MAMP/Library/bin/mysqld: unknown variable 'table_cache=64'
2015-06-15 01:24:55 13139 [ERROR] Aborting

After I google about this error, I get to know that I have to delete 'table_cache=64' variable from my.cnf (MySql Configuration) file. So I deleted this variable from /Applications/MAMP/tmp/mysql/my.cnf file.

But the problem is that the same error still occurs when I start the MySql again. So I looked at the my.cnf file, 'table_cache=64' re-appears automatically again. I deleted it again but it automatically appeared again when I start the MySql.

How should I solve this 'table_cache=64' problem?

1
  • I remember an odd problem on some old version of OS X, when configuring postfix from the GUI resulted in some garbled routing rule. Editing the file in an editor worked as expected.
    – dezso
    Jun 14, 2015 at 21:01

1 Answer 1

10

Version 5.1.3 "Renamed the table_cache system variable to table_open_cache. Any scripts that refer to table_cache should be 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.

However, what does the line in my.cnf look like? Sounds like there is something else wrong. Change it to

table_open_cache = 200

(If you have a tiny machine, 64 might be better. But in today's machines, a few hundred is a better value.)

1
  • Update... 2000 may be a reasonable value today.
    – Rick James
    Nov 23, 2019 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.