崩溃后启动 MySQL 时出错
Error Starting MySQL after Crash
当我的 Mac 崩溃时,我正兴高采烈地用 MAMP pro 安装 wordpress。现在我无法启动 MySql。我在网上读到的大多数东西都告诉我向它抛出一些终端命令,试图终止进程。
killall -9 mysqld
但终端报告"No matching processes belonging to you were found"
所以我查看了日志,可以从崩溃后第一次尝试重启时看到这一点
150506 21:11:33 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
150506 21:11:33 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
150506 21:11:33 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
150506 21:11:33 [Note] Plugin 'FEDERATED' is disabled.
150506 21:11:33 InnoDB: The InnoDB memory heap is disabled
150506 21:11:33 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150506 21:11:33 InnoDB: Compressed tables use zlib 1.2.3
150506 21:11:33 InnoDB: Initializing buffer pool, size = 128.0M
150506 21:11:33 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
150506 21:11:33 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
150506 21:11:33 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
150506 21:11:33 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
150506 21:11:34 InnoDB: Waiting for the background threads to start
150506 21:11:35 InnoDB: 5.5.42 started; log sequence number 0
150506 21:11:35 [Note] Event Scheduler: Loaded 0 events
150506 21:11:35 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.42' socket: '/Applications/MAMP/tmp/mysql/mysql.sock' port: 0 Source distribution
150506 21:16:44 [Note] /Applications/MAMP/Library/bin/mysqld: Normal shutdown
所以 Table Space 大小错误..我非常喜欢前端,不知道从哪里开始......??
请帮忙,我真的不能失去最后一周的工作。
谢谢你
正如您指出的 InnoDB 表空间已损坏,因此 InnoDB 无法启动。
如果您使用 innodb_force_recovery
选项启动 InnoDB,它可以容忍一些错误。尝试从 1 到 6 的值,直到 MySQL 开始。
如果你很幸运并且 MySQL 以 innodb_force_recovery
开头,那么使用我的sqldump 将所有表转储到 sql 文件中并重新创建 MySQL 数据库从头开始。 IE。将现有文件移动到某个安全的地方,启动 mysql_install_db,更改文件权限并启动 MySQL。然后加载数据库。
如果你没那么幸运,并且 MySQL 不是以 innodb_force_recovery=6
开头,那么请查看如何 Recover Corrupt MySQL Database .
为了避免以后出现这种情况,请使用 XtraBackup for Mac OS 进行备份。
请看她:
MAMP PRO crashes; MySQL will not start on reboot
感谢您提醒 MacOS 的 Xtrabackup,请密切关注这一点。
当我的 Mac 崩溃时,我正兴高采烈地用 MAMP pro 安装 wordpress。现在我无法启动 MySql。我在网上读到的大多数东西都告诉我向它抛出一些终端命令,试图终止进程。
killall -9 mysqld
但终端报告"No matching processes belonging to you were found"
所以我查看了日志,可以从崩溃后第一次尝试重启时看到这一点
150506 21:11:33 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
150506 21:11:33 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
150506 21:11:33 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
150506 21:11:33 [Note] Plugin 'FEDERATED' is disabled.
150506 21:11:33 InnoDB: The InnoDB memory heap is disabled
150506 21:11:33 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150506 21:11:33 InnoDB: Compressed tables use zlib 1.2.3
150506 21:11:33 InnoDB: Initializing buffer pool, size = 128.0M
150506 21:11:33 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
150506 21:11:33 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
150506 21:11:33 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
150506 21:11:33 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
150506 21:11:34 InnoDB: Waiting for the background threads to start
150506 21:11:35 InnoDB: 5.5.42 started; log sequence number 0
150506 21:11:35 [Note] Event Scheduler: Loaded 0 events
150506 21:11:35 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.42' socket: '/Applications/MAMP/tmp/mysql/mysql.sock' port: 0 Source distribution
150506 21:16:44 [Note] /Applications/MAMP/Library/bin/mysqld: Normal shutdown
所以 Table Space 大小错误..我非常喜欢前端,不知道从哪里开始......??
请帮忙,我真的不能失去最后一周的工作。
谢谢你
正如您指出的 InnoDB 表空间已损坏,因此 InnoDB 无法启动。
如果您使用 innodb_force_recovery
选项启动 InnoDB,它可以容忍一些错误。尝试从 1 到 6 的值,直到 MySQL 开始。
如果你很幸运并且 MySQL 以 innodb_force_recovery
开头,那么使用我的sqldump 将所有表转储到 sql 文件中并重新创建 MySQL 数据库从头开始。 IE。将现有文件移动到某个安全的地方,启动 mysql_install_db,更改文件权限并启动 MySQL。然后加载数据库。
如果你没那么幸运,并且 MySQL 不是以 innodb_force_recovery=6
开头,那么请查看如何 Recover Corrupt MySQL Database .
为了避免以后出现这种情况,请使用 XtraBackup for Mac OS 进行备份。
请看她: MAMP PRO crashes; MySQL will not start on reboot
感谢您提醒 MacOS 的 Xtrabackup,请密切关注这一点。