dtd5644 2016-06-17 09:31
浏览 430
已采纳

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

I upgraded mySQL from 5.5. to 5.7. I am not being able to make MAMP running MYSQL. Error log gives that:

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
  • 写回答

1条回答 默认 最新

  • duanbi7247 2016-06-17 21:20
    关注

    Fix

    Open up a terminal and chown MAMP's mysql database folder :

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

    Explanation

    I just ran into the same error, the hint is here :

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

    It means that the user running mysqld isn't allowed to read-write. But _mysql is the owner of this file :

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

    I ran ps -axj | grep mysql right after launching the server, and saw I was the owner of mysqld, instead of being owned by _mysql.

    It's a breaking change, I think we should have been warned in the release note.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?