MySQL:删除对数据库的所有引用

时间:2012-03-07 21:56:07

标签: mysql macos

将转储导入新创建的数据库时,服务器停止并显示经典的server has gone away消息。我知道为什么会这样,事实确实发生了这个问题并不是问题的一部分。我已经从/usr/local/mysql/data/删除了数据库目录,但mysqld仍然无法成功启动,可能是因为日志或初始化文件。

目标是在不必完全重新安装mysql的情况下解决此问题。

MySQL错误日志:

InnoDB: Page checksum 1559794421, prior-to-4.0.14-form checksum 641317514
InnoDB: stored checksum 3364647797, prior-to-4.0.14-form stored checksum 641317514
InnoDB: Page lsn 16 1049927436, low 4 bytes of lsn at page end 1049927436
InnoDB: Page number (if stored to page already) 43379,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an index page where index id is 0 3302
InnoDB: (index "some_index" of table "some_database"."some_table")
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 43379.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.

MySQL版本:

$ mysql --version
/usr/local/mysql/bin/mysql  Ver 14.14 Distrib 5.1.55, for apple-darwin10.3.0 (i386) using readline 5.1

MySQL conf文件:

$ cat /etc/my.cnf 
[mysqld]
max_allowed_packet=128M

1 个答案:

答案 0 :(得分:0)

您可以尝试通过以下方式执行强制恢复: How to do a Force Recovery InnoDB 或者尝试恢复表的更安全的方法: Table Recovery after Database page corruption 我希望它会对你有所帮助。