gpt4 book ai didi

php - MAMP:从 5.5 升级到 5.7 后无法启动 MySQL

转载 作者:可可西里 更新时间:2023-11-01 08:39:46 26 4
gpt4 key购买 nike

我从 5.5 升级了 mySQL。到 5.7。我无法让 MAMP 运行 MYSQL。错误日志给出:

160617 14:45:13 mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql
2016-06-17T09:45:13.908521Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-06-17T09:45:13.976451Z 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.
2016-06-17T09:45:13.976701Z 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.7.9) starting as process 28255 ...
2016-06-17T09:45:14.111330Z 0 [Warning] Setting lower_case_table_names=2 because file system for /Applications/MAMP/db/mysql/ is case insensitive
2016-06-17T09:45:14.136797Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-06-17T09:45:14.136828Z 0 [Note] InnoDB: Uses event mutexes
2016-06-17T09:45:14.136838Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-06-17T09:45:14.136849Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-06-17T09:45:14.137452Z 0 [Note] InnoDB: Number of pools: 1
2016-06-17T09:45:14.145153Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2016-06-17T09:45:14.230174Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2016-06-17T09:45:14.299060Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-06-17T09:45:14.395299Z 0 [ERROR] InnoDB: ./ib_logfile0 can't be opened in read-write mode.
2016-06-17T09:45:14.395336Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2016-06-17T09:45:14.707209Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2016-06-17T09:45:14.707274Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-06-17T09:45:14.707335Z 0 [ERROR] Failed to initialize plugins.
2016-06-17T09:45:14.707361Z 0 [ERROR] Aborting

2016-06-17T09:45:14.707400Z 0 [Note] Binlog end
2016-06-17T09:45:14.707585Z 0 [Note] Shutting down plugin 'CSV'
2016-06-17T09:45:14.719175Z 0 [Note] /Applications/MAMP/Library/bin/mysqld: Shutdown complete

160617 14:45:14 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended

最佳答案

修复

打开终端并chown MAMP 的mysql 数据库文件夹:

sudo chown -R `whoami`:admin /Applications/MAMP/db/mysql

解释

我刚遇到同样的错误,提示在这里:

[ERROR] InnoDB: ./ib_logfile0 can't be opened in read-write mode.

这意味着运行mysqld 的用户不允许读写。但是 _mysql 是这个文件的所有者:

-rw-r----- 1 _mysql admin 50331648 10 avr 22:35 ib_logfile0

我运行了 ps -axj | grep mysql 启动服务器后,看到 我是 mysqld 的所有者,而不是 _mysql 的所有者。

这是一个重大变化,我认为我们应该在发行说明中得到警告。

关于php - MAMP:从 5.5 升级到 5.7 后无法启动 MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37878012/

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