我无法使用以下方法备份我的数据库mysqldump,消息如下:
# Error: Unknown table engine 'PERFORMANCE_SCHEMA', inpossible to LOCK TABLE
即使我们重新启动服务后,此错误消息也不会消失:-(我们的转储文件似乎在某种程度上已损坏......
答案1
此错误似乎与MySQL 错误 #58406 (状态:已验证)。
目前,您可以忽略该消息。该过程将跳过表格并照常继续。
无论如何,如果你想确保你的数据库没有因为这个错误而损坏,只需强制mysqldump
忽略所有 performance_schema 表:
Parallels Plesk 面板:
# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` --all-databases > /root/mysql.full.dump --ignore-table=performance_schema.cond_instances --ignore-table=performance_schema.events_waits_current --ignore-table=performance_schema.cond_instances --ignore-table=performance_schema.events_waits_history --ignore-table=performance_schema.events_waits_history_long --ignore-table=performance_schema.events_waits_summary_by_instance --ignore-table=performance_schema.events_waits_summary_by_thread_by_event_name --ignore-table=performance_schema.events_waits_summary_global_by_event_name --ignore-table=performance_schema.file_instances --ignore-table=performance_schema.file_summary_by_event_name --ignore-table=performance_schema.file_summary_by_instance --ignore-table=performance_schema.mutex_instances --ignore-table=performance_schema.performance_timers --ignore-table=performance_schema.rwlock_instances --ignore-table=performance_schema.setup_consumers --ignore-table=performance_schema.setup_instruments --ignore-table=performance_schema.setup_timers --ignore-table=performance_schema.threads
默认方法:
# mysqldump -u <username> -p <password> --all-databases > /root/mysql.full.dump --ignore-table=performance_schema.cond_instances --ignore-table=performance_schema.events_waits_current --ignore-table=performance_schema.cond_instances --ignore-table=performance_schema.events_waits_history --ignore-table=performance_schema.events_waits_history_long --ignore-table=performance_schema.events_waits_summary_by_instance --ignore-table=performance_schema.events_waits_summary_by_thread_by_event_name --ignore-table=performance_schema.events_waits_summary_global_by_event_name --ignore-table=performance_schema.file_instances --ignore-table=performance_schema.file_summary_by_event_name --ignore-table=performance_schema.file_summary_by_instance --ignore-table=performance_schema.mutex_instances --ignore-table=performance_schema.performance_timers --ignore-table=performance_schema.rwlock_instances --ignore-table=performance_schema.setup_consumers --ignore-table=performance_schema.setup_instruments --ignore-table=performance_schema.setup_timers --ignore-table=performance_schema.threads