mysql error : ERROR 1018 (HY000): Can't read dir of '.' (errno: 13)

前端 未结 6 1706
予麋鹿
予麋鹿 2020-12-13 08:36

when i try to view the databases in mysql i get this error:

ERROR 1018 (HY000): Can\'t read dir of \'.\' (errno: 13)

And that stops my app

6条回答
  •  盖世英雄少女心
    2020-12-13 09:14

    chown -R mysql:mysql /var/lib/mysql/
    
    chmod -R 755 /var/lib/mysql/
    

    I can confirm that these two chmod statements worked for me (Webmin didn't see the databases nor did show tables) but I'm not sure why I had to do this after setting up perhaps two dozen servers (Centos) with MySQL in that past few years.

提交回复
热议问题