Mamp的MySQL将无法启动 [英] mamp mysql won't start

查看:233
本文介绍了Mamp的MySQL将无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对mysql服务器有问题.当我启动MAMP时,Mysql服务器将无法启动.我试图更改端口,但无济于事.我在错误日志中找到了该错误日志:

I have problem with mysql server. When I start MAMP Mysql server won't start. I tried to change port but it didn't help. I check the error log where I find this:

161010 09:21:07 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql56
2016-10-10 09:21:07 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-10-10 09:21:07 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.6.28) starting as process 6633 ...
2016-10-10 09:21:07 6633 [Warning] Setting lower_case_table_names=2 because file system for /Applications/MAMP/db/mysql56/ is case insensitive
2016-10-10 09:21:07 6633 [Note] Plugin 'FEDERATED' is disabled.
/Applications/MAMP/Library/bin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13 - Permission denied)
2016-10-10 09:21:07 6633 [ERROR] Can't open the mysql.plugin table.    Please run mysql_upgrade to create it.
2016-10-10 09:21:07 6633 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-10-10 09:21:07 6633 [Note] InnoDB: The InnoDB memory heap is disabled
2016-10-10 09:21:07 6633 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-10-10 09:21:07 6633 [Note] InnoDB: Memory barrier is not used
2016-10-10 09:21:07 6633 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-10-10 09:21:07 6633 [Note] InnoDB: Using CPU crc32 instructions
2016-10-10 09:21:07 6633 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-10-10 09:21:07 6633 [Note] InnoDB: Completed initialization of buffer pool
2016-10-10 09:21:07 6633 [Note] InnoDB: Highest supported file format is Barracuda.
2016-10-10 09:21:07 6633 [Note] InnoDB: 128 rollback segment(s) are active.
2016-10-10 09:21:07 6633 [Note] InnoDB: Waiting for purge to start
2016-10-10 09:21:07 6633 [Note] InnoDB: 5.6.28 started; log sequence number 1600617
2016-10-10 09:21:07 6633 [Note] RSA private key file not found: /Applications/MAMP/db/mysql56//private_key.pem. Some authentication plugins will not work.
2016-10-10 09:21:07 6633 [Note] RSA public key file not found: /Applications/MAMP/db/mysql56//public_key.pem. Some authentication plugins will not work.
2016-10-10 09:21:07 6633 [Note] Server hostname (bind-address): '*'; port: 3308
2016-10-10 09:21:07 6633 [Note] IPv6 is available.
2016-10-10 09:21:07 6633 [Note]   - '::' resolves to '::';
2016-10-10 09:21:07 6633 [Note] Server socket created on IP: '::'.
2016-10-10 09:21:07 6633 [ERROR] /Applications/MAMP/Library/bin/mysqld:  Can't find file: './mysql/user.frm' (errno: 13 - Permission denied)
2016-10-10 09:21:07 6633 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/user.frm' (errno: 13 - Permission denied)
161010 09:21:07 mysqld_safe mysqld from pid file   /Applications/MAMP/tmp/mysql/mysql.pid ended

我希望有人能帮助我解决这个问题.

I hope someone can help me how to solve this problem.

推荐答案

我不知道这是否是您的问题,但我尝试使用killall -9 mysqld杀死mysqld并尝试查找在活动监视器中运行的mysqld,但它不在那里.

I don't know if this will be your problem, but I tried killing mysqld with killall -9 mysqld and tried looking for mysqld running in Activity Monitor, but it wasn't there.

最终我解决了这个问题:在我看来,发生问题之前是mysqldump被中断了.那破坏了一个表空间.因此,我退出并重新启动了MAMP PRO(服务器未设置为自动启动).然后使用"MAMPs文件">编辑模板"更改my.cnf.并添加了行innodb_force_recovery = 1.之后,服务器启动正常.修复后,我注释了该行.

Eventually I worked it out: What had happened before the problem for me was that a mysqldump had been interrupted. That had corrupted a tablespace. So I quit and restarted MAMP PRO (servers are not set to auto start). Then changed my.cnf using MAMPs File > Edit template. And added the line innodb_force_recovery = 1. The servers started fine after that. I commented out that line after the fix.

这篇关于Mamp的MySQL将无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆