mysql server won't start MAMP

2020-03-30 09:55发布

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.

标签: mysql mamp
5条回答
我欲成王,谁敢阻挡
2楼-- · 2020-03-30 09:56

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.

查看更多
一夜七次
3楼-- · 2020-03-30 09:57

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.

查看更多
等我变得足够好
4楼-- · 2020-03-30 10:03

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.

查看更多
贼婆χ
5楼-- · 2020-03-30 10:06

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.

查看更多
唯我独甜
6楼-- · 2020-03-30 10:16

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/*

查看更多
登录 后发表回答