本文操作环境:Windows7系统、Mysql5.7版、Dell G3电脑。
mysql 提示表不存在的解决方法error: 1146: Table doesn‘t exist
直接拷贝数据库导致提示表不存在的解决方法
电脑重装系统后把原来的mysql data复制进去后大部分表是可以访问的,但是有几个表提示表不存在:
error: 1146: Table 'your_table' doesn't exist
登录后复制
如果替换ibdata文件后发现启动报错
[root@localhost data]# service mysql start Redirecting to /bin/systemctl start mysql.service Job 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=1 Jan 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.
登录后复制
如果是数据表损坏请尝试修复表
推荐学习:《mysql视频教程》
以上就是怎么解决mysql 1146错误问题的详细内容,更多请关注风君子博客其它相关文章!