mysql> use dbname;How do I fix this problem under Debian Linux?
mysql> show tables;
ERROR 1018 (HY000): Can't read dir of './dbname/' (errno: 13)
To fix this problem you need to set correct permission on /var/lib/mysql/dbname/ directory. Use the command as follows:
cd /var/lib/mysql/
ls -l
chown mysql:mysql dbname/ -R
Replace dbname with actual database directory name. Now you can connect to your mysql server:
mysql -u user -p dbname -e 'show tables;'
No comments:
Post a Comment