mysqldump: Got error: 1168 differently defined non-MyISAM LOCK TABLES
mysqldump: Got error: 1168: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist when using LOCK TABLES
備份其他的資料庫可以成功。但是備份下面這個資料庫starive就失敗了。
備份資料庫starive:
sudo mysqldump -uroot -p密碼 -l starive > /home/***/mysql/backup/starive.sql
出現瞭如下錯誤:
mysqldump: Got error: 1168: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist when using LOCK TABLES
檢視錯誤日誌 /usr/local/mysql/data/***-VirtualBox.err, 最新的內容如下:
141015 11:15:34 [Note] Plugin 'FEDERATED' is disabled.
141015 11:15:34 InnoDB: The InnoDB memory heap is disabled
141015 11:15:34 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
141015 11:15:34 InnoDB: Compressed tables use zlib 1.2.3
141015 11:15:34 InnoDB: Using Linux native AIO
141015 11:15:34 InnoDB: Initializing buffer pool, size = 128.0M
141015 11:15:35 InnoDB: Completed initialization of buffer pool
141015 11:15:35 InnoDB: highest supported file format is Barracuda.
141015 11:15:36 InnoDB: Waiting for the background threads to start
141015 11:15:37 InnoDB: 5.5.39 started; log sequence number 44666057
141015 11:15:37 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141015 11:15:37 [Note] - '0.0.0.0' resolves to '0.0.0.0';
141015 11:15:37 [Note] Server socket created on IP: '0.0.0.0'.
141015 11:15:37 [Note] Event Scheduler: Loaded 1 event
141015 11:15:37 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.39-log' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Se
rver (GPL)
解決方法及其過程:
把原來的starive2.sql 刪除掉,然後再來備份:
sudo mysqldump -uroot -p*** starive2 > /home/*****/mysql/backup/starive2.sql
成功了。
重新啟動Ubuntu:
參考書籍《深入淺出MySQL 資料庫開發、優化與管理維護(第2版)》 P 438: 加入 --single-transaction ----》加這個引數後立馬找到原因了
*****@*****-VirtualBox:/usr/local/mysql/bin$ sudo mysqldump -uroot -pgao --single-transaction starive > /home/*****/mysql/backup/starive.sql
[sudo] password for *****:
mysqldump: Couldn't execute 'show create table `payment_all`': Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist (1168)
去資料庫starive查詢表:payment_all, 果然沒有這個表。
那就把這個表刪除掉:
- drop table payment_all;
*****@*****-VirtualBox:/usr/local/mysql/bin$ sudo mysqldump -uroot -p*** --single-transaction starive > /home/*****/mysql/backup/starive.sql*****@*****-VirtualBox:/usr/local/mysql/bin$
成功了!!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26435490/viewspace-1299449/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysqldump Got error: 1045MySqlGoError
- mysqldump Got error 1290MySqlGoError
- Mysql報錯Fatal error:Can't open and lock privilege tablesMySqlError
- 深入理解mysqldump原理 --single-transaction --lock-all-tables --master-dataMySqlAST
- mysqldump: Got error: 2002: Can't connect to local MySQL server through.....MySqlGoErrorServer
- 【Mysql】FLUSH TABLES WITH READ LOCKMySql
- mysql表鎖與lock tablesMySql
- MySQL 5.5 LOCK TABLES 和 UNLOCK TABLES 語句介紹MySql
- MySQL ERROR Got an error reading communication packetsMySqlErrorGo
- Last_IO_Error: Got fatal error 1236ASTErrorGo
- mysql關於FLUSH TABLES和FLUSH TABLES WITH READ LOCK的理解MySql
- exp tables sh: Syntax error: `(' is not expectedError
- Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist解決辦法ErrorMySql
- xtrabackup 不用lock tables來複製備庫
- expdp report error when export tablesErrorExport
- ERROR 1168 (HY000): Unable to open underlying table which isError
- Got error 28 from storage engine 解決方法GoError
- ASP.NET MVC got 405 error on HTTP DELETE requestASP.NETMVCGoErrorHTTPdelete
- MySQL 5.5 FLUSH TABLES WITH READ LOCK語句介紹MySql
- mysqldump: Error: Binlogging on server not activeMySqlErrorServer
- [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11Error
- 【MySQL】Got fatal error 1236原因和解決方法MySqlGoError
- mysql 5.5 lock tables與隱式事務提交commitMySqlMIT
- 【MySQL】mysqldump Error 3024: Query execution was interruptedMySqlError
- VS error LNK2005:**already defined in **.objErrorOBJ
- mysqldump匯出報錯"mysqldump: Error 2013 ... during query when dumping tableMySqlError
- mysqldump的log-error引數注意事項MySqlError
- mysql之 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11MySqlError
- 解決ERROR 1030 (HY000): Got error 168 from storage engine apparmorErrorGoAPP
- error LNK2005: already defined in libcmt.libError
- mysql主從同步失敗Last_IO_Error: Got fatal error 1236 from master解決方法MySql主從同步ASTErrorGo
- 【Mysql】Slave_IO_Running: No---Got fatal error 1236 from masterMySqlGoErrorAST
- Oracle Database on NFS : unable to lock file - already in use" ErrorOracleDatabaseNFSError
- mysqldump error1066 錯誤的解決辦法MySqlError
- Percona MySQL 日誌中出現大量Aborted connection (Got an error reading)MySqlGoError
- master bug InnoDB Error unlock row could not find a 4 mode lockASTError
- Got fatal error 1236 from master when reading data from binary logGoErrorAST
- MySQL 使用 show tables 時出現 ERROR 1449 (HY000) 問題MySqlError