一尘不染

MAMP mysql服务器无法启动。没有mysql进程正在运行

mysql

我的MAMP
mysql服务器无法启动。我在网上看到的所有建议都说检查其他正在运行的mysqld进程并杀死它们(如果它们存在的话),并且它应该解决问题,但是对我来说不是。

这是错误日志:

130415 13:42:12 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
130415 13:42:12 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
130415 13:42:12 [Note] Plugin 'FEDERATED' is disabled.
130415 13:42:12 InnoDB: The InnoDB memory heap is disabled
130415 13:42:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130415 13:42:12 InnoDB: Compressed tables use zlib 1.2.3
130415 13:42:12 InnoDB: Initializing buffer pool, size = 128.0M
130415 13:42:12 InnoDB: Completed initialization of buffer pool
130415 13:42:12 InnoDB: highest supported file format is Barracuda.
130415 13:42:13  InnoDB: Waiting for the background threads to start
130415 13:42:14 InnoDB: 1.1.8 started; log sequence number 1707549
130415 13:42:14 [Note] Event Scheduler: Loaded 0 events
130415 13:42:14 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.5.25'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 0  Source distribution

似乎该连接已向我开放,但是MAMP stil错误并显示以下消息:“ MySQL无法启动。请查看日志以获取更多信息。”

有什么建议么?


阅读 398

收藏
2020-05-17

共1个答案

一尘不染

对我有用的是删除mysql目录中的所有文件(但不包括目录)。

编辑#2按照下面的答案,您只需要删除日志文件:[ib_logfile0,ib_logfile1]

因此,退出MAMP,然后在终端中:

rm /Applications/MAMP/db/mysql/ib_logfile* #(or wherever your MAMP is installed)

编辑!:有人提到您可能要先备份这些文件,以防万一出问题,所以也许只需使用mv即可:

mv /Applications/MAMP/db/mysql/*  /tmp/.

如果这样不起作用,请返回并终止所有进程: sudo killall -9 mysqld

这在这里也重复:
mysql服务器不会启动MAMP

2020-05-17