gpt4 book ai didi

mysql 没有在 mamp 上启动

转载 作者:可可西里 更新时间:2023-11-01 07:07:49 29 4
gpt4 key购买 nike

我使用 MAMP 已经有一段时间了,但几个月前它开始给我带来问题。从那以后,我通过谷歌搜索和堆栈溢出在线查看以找到解决方案,但我还没有看到任何可以帮助我的东西。

我搜索了一些文章,但我认为这些文章对我有帮助但没有:

MAMP mysql not starting我不确定我的数据目录的路径?我在终端中输入的任何内容似乎都因为找不到命令而返回

Mysql service won't start, InnoDB init function error

MAMP mysql server won't start. No mysql processes are running我试图 killall 但显示“没有找到属于你的匹配进程”错误

大约一个小时前,我的 mqsql 正在工作,但不是 apache,所以我发现文章说将 Library/bin/envvars 重命名为 _envvars,apache 在启动时工作,但 mysql 没有。

我的 php 日志中没有收到任何错误,但这是我的 apache 和 mysql 日志。

这是 mysql 错误日志底部的片段

InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
170118 15:52:39 InnoDB: Unable to open the first data file
InnoDB: Error in opening ./ibdata1
170118 15:52:39 InnoDB: Operating system error number 35 in a file operation.
InnoDB: Error number 35 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
170118 15:52:39 InnoDB: Could not open or create data files.
170118 15:52:39 InnoDB: If you tried to add new data files, and it failed here,
170118 15:52:39 InnoDB: you should now edit innodb_data_file_path in my.cnf back
170118 15:52:39 InnoDB: to what it was, and remove the new ibdata files InnoDB created
170118 15:52:39 InnoDB: in this failed attempt. InnoDB only wrote those files full of
170118 15:52:39 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
170118 15:52:39 InnoDB: remove old data files which contain your precious data!
170118 15:52:39 [ERROR] Plugin 'InnoDB' init function returned error.
170118 15:52:39 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
170118 15:52:39 [ERROR] Unknown/unsupported storage engine: InnoDB
170118 15:52:39 [ERROR] Aborting

170118 15:52:39 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete

170118 15:52:39 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended

然后是apache错误日志

[Wed Jan 18 15:48:28 2017] [notice] Digest: generating secret for digest authentication ...
[Wed Jan 18 15:48:28 2017] [notice] Digest: done
[Wed Jan 18 15:48:28 2017] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8zh DAV/2 PHP/5.3.6 configured -- resuming normal operations
[Wed Jan 18 15:48:31 2017] [notice] caught SIGTERM, shutting down
[Wed Jan 18 15:51:01 2017] [notice] Digest: generating secret for digest authentication ...
[Wed Jan 18 15:51:01 2017] [notice] Digest: done
[Wed Jan 18 15:51:01 2017] [notice] Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8zh DAV/2 PHP/5.3.6 configured -- resuming normal operations

我的端口是:apache 80 和 mysql 3306。

如果有人知道可能会发生什么,那将是惊人的......

最佳答案

去年 12 月,当我在 Mac 上遇到同样的问题时,我进行了一些探索并找到了一个非常简单的解决方案:

  1. 退出 MAMP
  2. 在查找器中转到 Applications/MAMP/db/mysql56/并删除最后一个日志文件,在我的例子中是 ib_logfile1。 (最好在删除之前备份此文件,或者将其移动到其他位置而不是删除它。)
  3. 重新启动 MAMP。就是这样!

有些人报告说还需要删除 ib_logfile0,但我的情况并非如此。您可以在 JuanFra.me 中查看我去年首次发布解决方案的博客。

我不知道此解决方案为何或如何起作用,但正如 JuanFra 的博客中所报告的那样,它似乎对其他许多人都有帮助。我希望它对你也有用。

关于mysql 没有在 mamp 上启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41731627/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com