【发布时间】:2019-01-22 18:02:06
【问题描述】:
这是我的错误日志,我不知道为什么 mysql 不能从 MAMP pro 启动。它以 MAMP 开头。
2018-08-15T20:00:17.6NZ mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
2018-08-15T20:07:13.6NZ mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error.log'.
2018-08-15T20:07:13.6NZ mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql57
2018-08-15T20:07:13.461794Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2018-08-15T20:07:13.462033Z 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.7.21) starting as process 80443 ...
2018-08-15T20:07:13.466069Z 0 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql57/ is case insensitive
2018-08-15T20:07:13.468580Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-08-15T20:07:13.468648Z 0 [Note] InnoDB: Uses event mutexes
2018-08-15T20:07:13.468705Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-08-15T20:07:13.468724Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-08-15T20:07:13.468779Z 0 [Note] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
2018-08-15T20:07:13.469152Z 0 [Note] InnoDB: Number of pools: 1
2018-08-15T20:07:13.469343Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-08-15T20:07:13.470836Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-08-15T20:07:13.484818Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-08-15T20:07:13.498079Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!
2018-08-15T20:07:13.498170Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-08-15T20:07:13.807668Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-08-15T20:07:13.807745Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-08-15T20:07:13.807819Z 0 [ERROR] Failed to initialize builtin plugins.
2018-08-15T20:07:13.807888Z 0 [ERROR] Aborting
2018-08-15T20:07:13.807956Z 0 [Note] Binlog end
2018-08-15T20:07:13.808103Z 0 [Note] Shutting down plugin 'CSV'
2018-08-15T20:07:13.808957Z 0 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete
2018-08-15T20:07:13.6NZ mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended
我没有运行 mysql 实例。这里的任何帮助将不胜感激。谢谢
【问题讨论】:
-
两点。首先,最好将其发布在 MAMP 支持论坛上,因为它看起来更像是一个 MAMP 错误,而不是您的错误。其次,不要使用 MAMP,它很复杂,很神秘,并且经常会导致这样的问题,只是为了方便使用带有可单击按钮的 gui 来启动/停止。尝试使用Homebrew 构建/启动/停止/更新本地开发环境。除了大约一个小时的学习它的命令外,您会对结果的灵活性感到更加满意,并且它更加稳定和易于理解。
-
MAMP 之所以难以修复,是因为它们用自己的内部环境变量替换了所有配置选项,这些变量无法以任何连贯的方式解释、调试或以其他方式理解在您在 gui 中获得的非常有限的选项子集之外。即使日志给了你一些相关的东西,祝你好运追踪如何在 MAMP-speak 中实际更改它。
-
@mopsyd 问题是我需要将我的 laravel 项目从 5.5 更新到 5.6,为此,我必须将 PHP 从 7.0 更新到 7.1 或更高版本。我不希望我的其他项目因此受到影响。寻找一个简单快速的解决方案也是如此。你的意思是宅基地还是自制的?我确实想过用宅基地来做这件事,但有人建议我使用 MAMP,因为它更容易、更轻松。相反,我正处于一个循环中,只是想弄清楚如何让 MAMP pro 与我的项目一起工作。所以宅基地将是比 MAMP pro 更好的选择,对吧?感谢您的回复。
-
更新:我遵循了一些堆栈溢出解决方案,但对我没有任何帮助。尝试删除日志文件stackoverflow.com/questions/16021564/… 还检查是否有任何 mysql 实例正在运行并停止它们
-
如果您需要从 localhost 运行多个特定于项目的 php 实例,您最好的选择可能是 docker,它可以同时运行它们。 Homebrew 一次只能运行一个,但您可以根据需要取消链接和重新链接它们。 MAMP 可以在其包含的版本之间切换,但只能在它附带的版本之间切换。