Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of mysql 1146 error

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article focuses on "how to solve the problem of mysql 1146 errors". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the mysql 1146 error problem.

Mysql 1146 error solution: 1, copy the ibdata1;2 in the original mysql installation directory data, check whether the ibdata file belongs to the correct user and user group; 3, use "repair table tablename" to repair the table.

This article operating environment: Windows7 system, Mysql5.7 version, Dell G3 computer.

How to solve the mysql 1146 error problem?

Mysql prompt table does not exist solution error: 1146: Table doesn't exist

The solution to the problem that the table does not exist due to directly copying the database.

After the computer reinstalls the system, most of the tables are accessible after copying the original mysql data, but several tables indicate that the tables do not exist:

Error: 1146: Table 'your_table' doesn't exist

In this case, the ibdata1 in the original mysql installation directory data should also be copied.

INNODB is a popular database engine for MYSQL database, which supports transactions (row level) and becomes possible in enterprise applications.

Ibdata is used to store the data of files, and the table files in the folder of the library name are just structures. As the new version of mysql tries innodb by default, ibdata1 files exist by default. Without this file, some data tables will make errors.

If you find a startup error after replacing the ibdata file

[root@localhost data] # service mysql startRedirecting to / bin/systemctl start mysql.serviceJob for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl-xe" for details. [root@localhost data] # systemctl status mysqld.service ● mysqld.service-LSB: start and stop MySQL Loaded: loaded (/ etc/rc.d/init.d/mysqld; bad; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2019-01-08 18:12:43 CST 8s ago Docs: man:systemd-sysv-generator (8) Process: 11815 ExecStop=/etc/rc.d/init.d/mysqld stop (code=exited, status=0/SUCCESS) Process: 13300 ExecStart=/etc/rc.d/init.d/mysqld start (code=exited, status=1/FAILURE) Jan 08 18:12:40 localhost.localdomain systemd [1]: Starting LSB: start and stop MySQL...Jan 08 18:12:43 localhost.localdomain mysqld [13300]: Starting MySQL... ERROR! The server quit without updating PID file (/ www/server/data/localhost.localdomain.pid). Jan 08 18:12:43 localhost.localdomain systemd [1]: mysqld.service: control process exited, code=exited status=1Jan 08 18:12:43 localhost.localdomain systemd [1]: Failed to start LSB: start and stop MySQL.Jan 08 18:12:43 localhost.localdomain systemd [1]: Unit mysqld.service entered failed state.Jan 08 18:12:43 localhost.localdomain systemd [1]: mysqld.service failed.

At this time, check to see if your ibdata file belongs to the correct user and user group, which may be caused by permission problems.

If the data table is damaged, try to repair the table.

At this point, I believe you have a deeper understanding of "how to solve the problem of mysql 1146 errors". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 256

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report