MySQL Error after update: Changed limits: max_open_files after mysql_upgrade

Linode Staff


Recently, /var/log/mysql/error.log was clogging up with huge numbers of this warning:

[Warning] Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade

So I ran mysql_upgrade, apparently successfully. I just want to check about two Warning messages in error.log when I restart mysql:

[Warning] Changed limits: max_open_files: 1024 (requested 5000)

[Warning] Changed limits: table_open_cache: 431 (requested 2000)

What is the cause of this/ What can I do to fix it?

1 Reply


It appears that certain values that handle these limits can be reset after running upgrades. The process here is basically increasing the open file limit to accommodate your configuration.

I found a few pages discussing this error that will also walk you through the resolution:

This will have you creating a configuration file and setting a new limit for it. For example, here are the instructions for Debian based distributions using systemd:

First, create

mkdir -p /lib/systemd/system/mysql.service.d/

Then make this .conf file

vi /lib/systemd/system/mysql.service.d/limit_nofile.conf

Add the following line:


Afterwards, reload daemons and restart mysql:

systemctl daemon-reload
systemctl restart mysql

Hopefully this helps!



Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct