当我的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所以表空间大小误差..。我是一个前端的家伙,不知道从哪里开始这个.?
请帮帮忙,我实在负担不起最后一周的工作。
谢谢你
发布于 2015-05-28 20:56:50
正如您所指出的,InnoDB表空间已损坏,因此InnoDB无法启动。
InnoDB可以容忍一些错误,如果您使用选项innodb_force_recovery启动它。尝试从1到6的值,直到MySQL启动。
如果幸运的话,MySQL从innodb_force_recovery开始,然后将所有表转储到带有mysqldump的sql文件中,然后从头开始重新创建MySQL数据库。即将现有文件移动到某个安全的位置,启动mysql_install_db,更改文件权限并启动MySQL。然后将数据库加载回。
如果您不太幸运,而且MySQL没有从innodb_force_recovery=6开始,那么就检查如何使用恢复损坏的MySQL数据库。
为了避免将来发生这种情况,请使用用于Mac的XtraBackup进行备份。
发布于 2015-05-28 22:05:50
感谢您为MacOS提供Xtrabackup的提示,您可以密切关注这一点。
https://stackoverflow.com/questions/30516553
复制相似问题