【问题标题】:mysql lost table product_attribute_groupsmysql丢失表product_attribute_groups
【发布时间】:2013-07-27 23:25:01
【问题描述】:

我的一张桌子最近不见了!

当我运行:“show tables”时,会列出“product_attribute_groups”,但是当我运行“select * from product_attribute_groups”时,mysql 返回错误:“#1146 - 表 'product_attribute_groups' 不存在”

我试图转储我的数据库,mysql 返回错误:“1146:使用 LOCK TABLES 时表 'product_attribute_groups' 不存在”

请帮我恢复这张表并备份我的数据库。

【问题讨论】:

  • 我也有同样的情况——原因是“lower_case_table_names”
  • eggyal:InnoDB (Mysql 5.6.12-2)。 jaczes,你是怎么解决这个问题的?请告诉我更多细节
  • 运行“显示变量”:lower_case_table_names 0

标签: mysql mysqldump


【解决方案1】:

*以大写形式创建的表,根据您的应用要求设置lower_case_table_names。

*表损坏,修复表。

如果以上几点都OK,那么使用--skip-lock-tables参数和mysqldump。

我相信这会解决错误。

【讨论】:

  • "修复表product_attribute_groups" | db_giaonhan.product_attribute_groups |维修 |错误 |表 'db_giaonhan.product_attribute_groups' 不存在 | | db_giaonhan.product_attribute_groups |维修 |状态 |操作失败
  • ..检查您是否在表上使用正确的权限。使用命令检查表是否存在“mysqlcheck -u mysql_username -p database_name”这将检查并修复任何数据库和提供给它的表。但是,如果这不起作用,请告诉我 mysql 引擎,您是否移植了您的数据库?
  • 我的数据库有 168 个表,mysqlcheck -u mysql_username -p database_name 打印所有表都可以,除了 product_attributes_groups(表不存在。状态:操作失败)。服务器是 Centos 5.8,运行 MySQL Community Server 5.6.12-1,Innodb 引擎。我试图转储我的数据库,mysql返回错误:“1146:使用锁定表时表'db_giaonhan.product_attribute_groups'不存在”
  • 如果您从其他地方恢复或移植了您的数据库,那么可能是它已损坏,请检查 db "information_schema" b/c "information_schema" 中的这些 "INNODB_LOCKS" 和 "TABLES" 表mysql内部数据库,存储有关mysql数据库表和权限等信息。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-01-31
  • 2011-04-05
  • 2016-08-04
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多