mysqldump: Got error: 1146: Table doesnt exist when using LOCK TABLES

[Email Question]

Hi, after a restore of a system failure now mysqldump give me an error of this type:

mysqldump: Got error: 1146: Table ‘wordpress.wp_bpspro_db_backup’ doesn’t exist when using LOCK TABLES

-- MySQL dump 10.13 Distrib 5.5.37, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: wordpress
-- ------------------------------------------------------
-- Server version 5.5.37-0ubuntu0.12.04.1-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

In my database this table does not exist, and the system doesn’t allow to create a table with this name.
Can you give me some idea?
Thanks


Problem was resolved by doing these steps.

My case was exactly what is describe in this post:  http://www.linux.org/threads/resolving-mysql-error-1146-table-doesnt-exist-when-doing-backup.2480/

mysqlcheck -u mysql_username -p database_name -> it’s give me that the table does not exists

show tables; -> it’s give me that the table is in list
i dropped the table with command “drop table table_name;” and then “show tables,” does not list it anymore.

From that moment mysqldump works fine.

Another method instead of a command line method to do the same thing would be to use phpMyAdmin and run an SQL Query.

Click the SQL tab in phpMyAdmin
Type: show tables
Click the Go button to run the SQL Query
If you see this error message below…
database_name.table_name
Error: Table ‘database_name.table_name’ doesn’t exist
status: Operation failed
Note:  database_name and table_name are just an example database name and an example table name.  You will see your actual database name and table name.
…click the phpMyAdmin SQL tab again.
Type (enter your actual table_name):  drop table table_name
Click the Go button to run the SQL Query and drop/delete the corrupt database table.

 

公司简介

 

自1996年以来,公司一直专注于域名注册、虚拟主机、服务器托管、网站建设、电子商务等互联网服务,不断践行"提供企业级解决方案,奉献个性化服务支持"的理念。作为戴尔"授权解决方案提供商",同时提供与公司服务相关联的硬件产品解决方案。
备案号: 豫ICP备05004936号-1

联系方式

地址:河南省郑州市经五路2号

电话:0371-63520088

QQ:76257322

网站:800188.com

电邮:该邮件地址已受到反垃圾邮件插件保护。要显示它需要在浏览器中启用 JavaScript。