mysql server won't start MAMP

六眼飞鱼酱① 提交于 2019-12-19 10:51:03

问题


I've read a few answers on here that say when your mysql server won't start in MAMP you should run

sudo killall -9 mysqld 

I've used that in the past and it has worked but for whatever reason it is not working this time. I'm getting this error message in the logs:

[04-May-2014 11:02:08 UTC] PHP Warning:  mysql_connect(): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) in /Users/Chappell/Websites/LFB/wp-includes/wp-db.php on line 1372

I recently transferred the files (not MAMP itself) for the site I'm working on from another computer where I was developing locally. Not sure if that's relevant but thought I'd point it out.


回答1:


I first tried 'sudo killall -9 mysqld' and didn't find any processes.

What did work for me was removing all files (but not directories) in the mysql dir: rm /Applications/MAMP/db/mysql/*




回答2:


Deleting the log files within the MAMP directory fixed this for me. Quit MAMP and try this in the terminal.

rm /Applications/MAMP/db/mysql56/ib_logfile0

rm /Applications/MAMP/db/mysql56/ib_logfile1

Open MAMP back up and try starting the servers again.




回答3:


The problem was quite simple in the end. I was using different versions of MAMP on the two separate computers. I just installed the latest version and it's working like a charm.




回答4:


It's been a while since this question but here's what worked for me:

I had mysql workbench boothing at computer restart. Deleted the software and everything was working.




回答5:


None of the solutions fixed my issue.

What I did was backup databases from /Library/Application Support/appsolute/MAMP PRO/db, and also backup "MAMP" folder.

Then deleted all and reinstalled Mamp.

Apparently my databases in /Library/Application Support/appsolute/MAMP PRO/db were damaged because when I copied the old ones there , the same issue started to happen.

I ended up copying (inside /Library/Application Support/appsolute/MAMP PRO/db/mysql56) only the important database folder, and ibdata1 file. Now everything works fine.



来源:https://stackoverflow.com/questions/23455841/mysql-server-wont-start-mamp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!