且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

(2006)MySQL服务器不见了

更新时间:2022-02-07 22:56:45

我终于能够解决此问题,绕过MySQL Workbench迁移工具,并使用mysqldup生成用于还原到服务器的数据库.sql文件。这是我的工作:

I was finally able to fix this issue but bypassing the MySQL Workbench Migration Tool and using mysqldup to generate the database .sql file used to restore to the server. Here's what I did:


  1. 从正在超时的MySQL服务器上删除所有数据库

  2. 已导出通过mysqldump从备份数据库中获取所有数据

  3. 将该转储文件恢复到新的MySQL服务器(
    超时的数据库)

  4. Ran mysql_upgrade,所有表均正常执行查询:
    现在一切正常

  1. Deleted all databases from the MySQL server that was timing out
  2. Exported all the data from our backup database via mysqldump
  3. Restored that dump file to the new MySQL server (the one that was timing out)
  4. Ran mysql_upgrade, all tables OK Executed the query: everything now works

这很奇怪:mysqlcheck和mysql_upgrade ,在因某种原因超时的数据库上运行时,返回状态为OK,但未发现任何错误。我不知道为什么,但是我认为这是一个非常奇怪和烦人的问题,考虑到这正是mysqlcheck的目的。

Here's the strange thing: mysqlcheck and mysql_upgrade, when run on the database that was somehow timing out, were returning status OK and not finding any errors. I do not know why, but I see this is a pretty strange and annoying problem, considering that's exactly what mysqlcheck is for.

如果您遇到此问题,请尝试从较早的备份(如果有)中还原数据库,并查看是否可行。

Anyway if you're having this problem try to restore the database from an older backup (if you have one) and see if that works.