1.首先声明我用的电脑是mac,网上搜索到的关于linux的修复方法我用不了.
2.我不是直接下载的mysql,我是用的XAMPP里面的mysql.
我之前只是重启过一次电脑,之后出现了这样的错误.
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 27
Server version: 10.1.10-MariaDB Source distribution
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use lab6
Database changed
MariaDB [lab6]> show tables;
ERROR 1018 (HY000): Can't read dir of './lab6/' (errno: 13 "Permission denied")
重启电脑后,发生的。重启之前是否安装或者更新了什么东西?在看看MYSQL目录的属主和属组,是否更变!改回去即可!