You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac系统下MAMP PRO中MySQL无法启动的问题求助(附错误日志)

Fix MySQL Startup Issues in MAMP PRO (Mac)

First, let's break down the hints from your error log and work through common fixes for this problem:

Your Error Log Snippet

180505 14:15:26 mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error.log'.
180505 14:15:26 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql56
2018-05-05 14:15:27 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).


1. Fix the TIMESTAMP Deprecation Warning

This warning can sometimes cause MySQL to abort silently. Let's update the config to resolve it:

  • Open MAMP PRO and navigate to the MySQL tab
  • Click the my.cnf Template button
  • Add this line under the [mysqld] section:
    explicit_defaults_for_timestamp = 1
    
  • Save the template, then restart MAMP PRO entirely.

2. Fix Database Directory Permissions

Incorrect permissions on MAMP's database folder are a common culprit:

  • Open Terminal and run these commands (replace mysql56 with your actual MySQL version if it's different):
    sudo chown -R _mysql:_mysql /Library/Application\ Support/appsolute/MAMP\ PRO/db/mysql56
    sudo chmod -R 755 /Library/Application\ Support/appsolute/MAMP\ PRO/db/mysql56
    
  • Enter your Mac password when prompted, then try starting MySQL again in MAMP PRO.

3. Check for Port Conflicts

Another MySQL instance (like the default one that comes with some Macs) might be using port 3306, blocking MAMP's MySQL:

  • In Terminal, run:
    lsof -i :3306
    
  • If a process shows up, kill it with:
    sudo kill -9 [PID]
    
    (Replace [PID] with the process ID from the lsof output)
  • Restart MAMP PRO after killing the process.

4. Inspect the Full Error Log

The snippet you shared only shows the start of the log. The real failure reason is likely further down:

  • Open /Applications/MAMP/logs/mysql_error.log with TextEdit or run:
    cat /Applications/MAMP/logs/mysql_error.log
    
  • Look for lines starting with [ERROR] — these will point to the exact issue (corrupted tables, missing files, etc.).

If none of these steps resolve the problem, share the full error log and we can troubleshoot further!

内容的提问来源于stack exchange,提问作者Alessio Biscotto

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 03:25:31