To tell how many files MySQL has open, you need to login as root and run one of the following commands:
# lsof | grep mysql
# lsof -c mysqld
# ls -l /proc/<PID>/fd /* where <PID> is the process ID of the program you are interested in */
# lsof | grep "/var/lib/mysql"
You can tell how many files your OS has opened with this:
# cat /proc/sys/fs/file-maxOn a MySQL client, you can run the following:
SHOW OPEN TABLESTo close the open files run:
FLUSH TABLES
Comments