当我的Mac崩溃时,我正在用MAMP专业版安装wordpress。现在我无法启动MySql。我在网上看到的大多数东西都告诉我在它上面抛出一些终端命令,试图杀死进程。
killall -9 mysqld
但终端报告"找不到属于您的匹配流程"
所以我查看了日志,可以从崩溃后第一次重启尝试时看到这个
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
所以表空间大小错误..我是一个前端人,不知道从哪里开始......?
请帮助,我真的无法放松上周的工作。
谢谢你
答案 0 :(得分:1)
正如您所指出的,InnoDB表空间已损坏,因此InnoDB无法启动。
如果您使用选项innodb_force_recovery
启动它,InnoDB可以容忍一些错误。尝试从1到6的值,直到MySQL开始。
如果你很幸运并且MySQL以innodb_force_recovery
开头,那么将所有表转储到带有mysqldump的sql文件中,并从头开始重新创建MySQL数据库。即将现有文件移动到某个安全的地方,启动mysql_install_db,更改文件权限并启动MySQL。然后重新加载数据库。
如果你不那么幸运,而且MySQL并不是从innodb_force_recovery=6
开始,那么请查看Recover Corrupt MySQL Database的方法。
为了避免以后使用XtraBackup for Mac OS进行备份的经验。
答案 1 :(得分:0)
请见她: MAMP PRO crashes; MySQL will not start on reboot
感谢您使用Xtrabackup for MacOS,一个关注它。