MySQL 导出数据库,出现 “mysqldump: Got error: 1146”

出现场景mysql

在 cmd 导出数据库时:sql

mysqldump -hlocalhost -uroot -p student_db > C:\student_db.sql

出现:shell

mysqldump: Got error: 1146: Table 'student_db.student' doesn't exist when using LOCK TABLES

解决过程数据库

网上说锁定全部表便可解决,即:--lock-all-tables,-x
mysqldump -hlocalhost -uroot -p -x student_db > C:\student_db.sql
然而个人状况并无解决。code

查看出现问题的数据表:cmd

use student_db;
show tables;
-- student 存在

select * from student;
show create table student;
-- 上面两个都提示:ERROR 1146 (42S02): Table 'student_db.student' doesn't exist

结论table

重启 MySQL,再次进入时 OK。class

相关文章
相关标签/搜索