Solution to MySQL unable to read table error (MySQL 1018 error)

Solution to MySQL unable to read table error (MySQL 1018 error)

1. Error reproduction

I can access the MySQL database, but I cannot read the database table. The error message is as follows: When accessing the database, an inexplicable error message 1018 is reported: ERROR 1018 (HY000): Can't read dir of './cnapscips/' (errno: 13).


2. Solution

Check the MySQL data directory. Generally, the tables that cannot be read are copied databases. Even the root user cannot read the tables. You need to modify the directory permissions.


Modify the directory permissions, use the command: chown -R mysql:mysql /var/lib/mysql/cnapscips (executed by the root user)

Note: cnapscips here is my database name. When modifying permissions, be sure to change it to a database name that you cannot read.

Use show cnapscips again;


The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • MySQL error ERROR 2002 (HY000): Can't connect to local MySQL server through socket
  • mysql error:#1062 Duplicate entry '***′ for key 1 problem solution
  • MYSQL ERROR 1045 (28000): Access denied for user (using password: YES) solution
  • UCenter info: MySQL Query Error SQL:SELECT value FROM [Table]vars WHERE noteexists
  • mysql ERROR 1044 (42000): Access denied for user ''''@''localhost'' to database
  • How to solve Error 1045 access denied when installing MYSQL on winxp
  • InnoDB: Error: log file ./ib_logfile0 is of different size 0 5242880 bytes during MySQL startup
  • MySQLdb ImportError: libmysqlclient.so.18 solution
  • mysql error 1130 hy000: Host ''localhost'' solution
  • Detailed explanation of the problem of remote connection to MySQL database (ERROR 2003 (HY000))

<<:  Detailed explanation of Linux Namespace User

>>:  Example code for implementing verification code login in SMS API in Node

Recommend

How to clear default styles and set common styles in CSS

CSS Clear Default Styles The usual clear default ...

Resolving MySQL implicit conversion issues

1. Problem Description root@mysqldb 22:12: [xucl]...

Detailed explanation of angular parent-child component communication

Table of contents APIs used Simple Example person...

Detailed explanation of several ways to install CMake on Ubuntu

apt install CMake sudo apt install cmake This met...

Pure CSS drop-down menu

Achieve results Implementation Code html <div ...

Sample code for making a drop-down menu using pure CSS

Introduction: When I looked at interview question...

Prototype and prototype chain prototype and proto details

Table of contents 1. Prototype 2. Prototype chain...

How to convert JavaScript array into tree structure

1. Demand The backend provides such data for the ...

Detailed explanation of Javascript Echarts air quality map effect

We need to first combine the air quality data wit...

MySQL online deadlock analysis practice

Preface I believe that everyone has had a simple ...

Do designers need to learn to code?

Often, after a web design is completed, the desig...

Two solutions for automatically adding 0 to js regular format date and time

Table of contents background Solution 1 Ideas: Co...