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

HTML+CSS+JS sample code to imitate the brightness adjustment effect of win10

HTML+CSS+JS imitates win10 brightness adjustment ...

MySQL limit performance analysis and optimization

1. Conclusion Syntax: limit offset, rows Conclusi...

Example of using CSS3 to customize the style of input multiple-select box

Principle: First hide the input element, then use...

N ways to cleverly implement adaptive dividers with CSS

Dividing lines are a common type of design on web...

How to click on the a tag to pop up the input file upload dialog box

html Copy code The code is as follows: <SPAN cl...

Specific use of the wx.getUserProfile interface in the applet

Recently, WeChat Mini Program has proposed adjust...

Nginx monitoring issues under Linux

nginx installation Ensure that the virtual machin...

Detailed explanation of several ways to export data in Mysql

There are many purposes for exporting MySQL data,...

Issues with locking in MySQL

Lock classification: From the granularity of data...

Detailed method of using goaccess to analyze nginx logs

Recently I want to use goaccess to analyze nginx ...

A few things about favicon.ico (it’s best to put it in the root directory)

Open any web page: for example, http://www.baidu....

6 Ways to Elegantly Handle Objects in JavaScript

Table of contents Preface 1. Object.freeze() 2. O...

How to enhance Linux and Unix server security

Network security is a very important topic, and t...

Using react-virtualized to implement a long list of images with dynamic height

Table of contents Problems encountered during dev...

Several methods of deploying multiple front-end projects with nginx

I have summarized 3 methods to deploy multiple fr...