【发布时间】:2017-03-17 17:51:52
【问题描述】:
我正在尝试转储我的数据库:
mysqldump myDatabase > myDatabase.sql
但我收到此错误:
mysqldump: Got error: 1146: Table 'myDatabase.table' doesn't exist when using LOCK TABLES
当我去mysql时:
mysql -u admin -p
我查询表格:
show tables;
我看到了桌子。但是当我查询那个特定的表时:
select * from table;
我得到同样的错误:
ERROR 1146 (42S02): Table 'myDatabase.table' doesn't exist
我尝试修复:
mysqlcheck -u admin -p --auto-repair --check --all-databases
但得到同样的错误:
Error : Table 'myDatase.table' doesn't exist
为什么我会收到此错误或如何解决此错误?
非常感谢您的帮助
【问题讨论】:
-
你确定表名中没有隐藏的字符 ..eg: char fo table name length ..
-
这可能是文件系统权限问题、数据库损坏或您的数据库从操作系统迁移到其他操作系统失败(例如 macOS/window 到 linux)?您可以尝试的一件事是Repair all tables in one go。如果是 InnoDB 表,那么解决问题可能会更复杂。
-
@scaisEdge
mysqldump应该使用正确的命名,这可能更多是配置或损坏问题。例如。将配置和/或数据库从不区分大小写的文件系统移动到区分大小写的文件系统。 -
@scaisEdge,我已经更新了我的问题。
标签: mysql phpmyadmin