[英]Mysql server on MAMP won't start
My Mysql server on MAMP won't start. MAMP 上的 Mysql 服务器无法启动。 This is the error:
这是错误:
161224 00:15:00 mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error_log.err'.
161224 00:15:00 mysqld_safe 登录到“/Applications/MAMP/logs/mysql_error_log.err”。 161224 00:15:00 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql56 161224 00:15:01 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
161224 00:15:00 mysqld_safe 使用 /Applications/MAMP/db/mysql56 中的数据库启动 mysqld 守护进程 161224 00:15:01 mysqld_safe mysqld 来自 pid 文件 /Applications/MAMP/tmp/mysql/mysql.pid 结束
I already tried the following commands:我已经尝试了以下命令:
> ps aux | grep mysql
> lsof -i
> sudo killall -9 mysqld
But the server is still not working.但是服务器仍然无法正常工作。
Help ?帮助 ?
Remove the files ib_logfileN
( N being the number) from the MAMP/db/mysql56
folder. 从
MAMP/db/mysql56
文件夹中删除文件ib_logfileN
( N是数字)。
Then restart MAMP. 然后重启MAMP。
Should Work!! 应该管用!!
Edit: If the above step doesn't work completely, please remove the ibdata<n>
file as well, based on the comments. 编辑:如果上述步骤不能完全运行,请根据注释删除
ibdata<n>
文件。
I am working on oS-X (Mac), I was wondering around and came to see this post which help me a lot. 我正在研究oS-X(Mac),我很想知道并且来看这个帖子对我有很大的帮助。
Many readers are being able to solve this problem thanks to the amazing here are the step to fix it out-- 很多读者都能够解决这个问题,这要归功于这里的惊人解决方案。
This issue generally occur due to explicitly closing of MAMP serves.
此问题通常由于明确关闭MAMP服务而发生。
Applications/MAMP/db/mysql/
Applications/MAMP/db/mysql/
It Worked for me , hope will work for you too.. 它为我工作,希望也会为你工作..
I killed the process mysqlid via Activity Monitor on MacOS and restarted MAMP and MySql run successfully. 我通过MacOS上的Activity Monitor杀死了mysqlid进程并重新启动了MAMP并成功运行了MySql。
Update: Even this solution works without restarting MAMP . 更新:即使这个解决方案无需重启MAMP即可运行 。
My MAMPs MySQL stopped working after a power failure, this worked for me: 我的MAMPs MySQL在电源故障后停止工作,这对我有用:
Stop servers from terminal 从终端停止服务器
Create my.cnf file in /Applications/MAMP/conf with the following: [mysqld] innodb_force_recovery = 1
使用以下命令在/ Applications / MAMP / conf中创建my.cnf文件:
[mysqld] innodb_force_recovery = 1
Start MySQL from same terminal window. 从相同的终端窗口启动MySQL。
Stop MySQL once it has recovered (Check the log in /Applications/MAMP/logs/mysql_error_log.err). 恢复后停止MySQL(检查登录/Applications/MAMP/logs/mysql_error_log.err)。
Remove the lines from my.cnf, save and start the servers as usual from the MAMP app. 从my.cnf中删除行,从MAMP应用程序照常保存并启动服务器。
MAMP is so touchy. MAMP 太敏感了。 Here's what worked for me:
这是对我有用的:
cd /Applications/MAMP
Move or rename: mv tmp tmp_OLD
.移动或重命名:
mv tmp tmp_OLD
。
Recreate the folder and a subfolder: mkdir tmp; mkdir tmp/mysql
重新创建文件夹和子文件夹:
mkdir tmp; mkdir tmp/mysql
mkdir tmp; mkdir tmp/mysql
Now start mysql from MAMP.现在从 MAMP 启动 mysql。 I think it's possible the socket lock file (
tmp/mysql/mysql.sock.lock
) gets corrupted and needs to be regenerated.我认为套接字锁定文件(
tmp/mysql/mysql.sock.lock
)可能已损坏并需要重新生成。
In some cases it may possible that the MySQL is already running on 3306 port. 在某些情况下,MySQL可能已经在3306端口上运行。 So, you can change the port number with 3307.
因此,您可以使用3307更改端口号。
PS: If you are bound to use 3306 in that case I think you can stop existing MySql server and let MAMP to do it for you. PS:如果在这种情况下你肯定会使用3306我认为你可以停止现有的MySql服务器并让MAMP为你做。
I tried everything but I don't know why I didn't find this solution yet.我尝试了一切,但我不知道为什么我还没有找到这个解决方案。
/Application/Mamp/tmp/mysql
/Application/Mamp/tmp/mysql
mysql.sock.lock
mysql.sock.lock
+1 if this answer is helpful :) +1 如果这个答案有帮助:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.