How to fix mysql error can’t read dir on Peppermint OS

Suddenly my php stack can’t open phpmyadmin. Its getting timeout all the time. Due to health problem I let it as I think my computer might need rest too like me 🙂

Today I need to overcome the problem since my friend need to access mysql table structure and I use command line, the error appear in different format :

mysql -u root -p nkppt -e ‘show tables;’
Enter password:
ERROR 1018 (HY000) at line 1: Can’t read dir of ‘./nkppt/’ (errno: 24)

Wow, I think the error also serious and apt-get update in last run might be the cause of this problem.

After look around I got solution from here.

Edit security limits

$ cat /etc/security/limits.conf

……

………..

mysql soft nofile 24000
mysql hard nofile 32000

Modify mysql.conf

$ cat /etc/init/mysql.conf
# MySQL Service

description     “MySQL Server”
author          “Mario Limonciello <[email protected]>”

start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]

respawn
respawn limit 2 5

env HOME=/etc/mysql
umask 007

# The default of 5 seconds is too low for mysql which needs to flush buffers
kill timeout 300

limit nofile 32000 32000
limit nproc 32000 32000

pre-start script
## Fetch a particular option from mysql’s invocation.
# Usage: void mysqld_get_param option

The lines in bold is solution for my problem.

Restart mysql service and my problem gone 🙂