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

Vue/react single page application back without refresh solution

Table of contents introduction Why bother? Commun...

Mysql 5.6 "implicit conversion" causes index failure and inaccurate data

background When performing a SQL query, I tried t...

40 fonts recommended for famous website logos

Do you know what fonts are used in the logo desig...

Introduction to Linux File Compression and Packaging

1. Introduction to compression and packaging Comm...

HTML input box optimization to improve user experience and ease of use

In order to improve user experience and ease of us...

Detailed graphic explanation of how to use svg in vue3+vite project

Today, in the practice of vue3+vite project, when...

Solution to the MySQL error "Every derived table must have its own alias"

MySQL reports an error when executing multi-table...

How to add, delete and modify columns in MySQL database

This article uses an example to describe how to a...

Tomcat parses XML and creates objects through reflection

The following example code introduces the princip...

Detailed explanation of how to restore database data through MySQL binary log

Website administrators often accidentally delete ...

Implementation of MySQL joint index (composite index)

Joint Index The definition of the joint index in ...

Use of MySQL truncate table statement

The Truncate table statement is used to delete/tr...

Simple steps to write custom instructions in Vue3.0

Preface Vue provides a wealth of built-in directi...

How to use Nginx to proxy multiple application sites in Docker

Preface What is the role of an agent? - Multiple ...