MySQL 1018 error, mysql1018
I. Error Reproduction
You Can access the MySQL database but cannot read the database table. The following ERROR is returned: 1018 ERROR: ERROR 1018 (HY000): Can't read dir '. /cnapscips/'(errno: 13 ).
Ii. Solutions
View the MySQL data directory. Generally, tables cannot be read from the copied database. Even the root user cannot read the table, the directory permission needs to be modified.
Modify directory permissions by running the command: chown-R mysql: mysql/var/lib/mysql/cnapscips (executed by the root user)
Note: The cnapscips here is the name of my database. When you modify the permission, you must replace it with the name of the database that you cannot read.
Use show cnapscips again;
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.