mysql> use dbname;
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;'

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2022-12-23
  • 2021-08-26
猜你喜欢
  • 2022-02-27
  • 2021-10-31
  • 2021-06-24
  • 2022-02-07
  • 2021-10-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案