brew mysql 无法启动_MAC OSX brew 升级 mysql5.6到5.7无法启动的问题
用 brew 將 mysql 從5.6.22升級到了5.7, 啟動mysql服務以后發現登錄不進去, 原來的密碼失效, 應該是兩個版本的 mysql.user表結構的差異造成的, 為了保留之前的數據, 所以卸載了5.7.x. 卸載以讓命令后重新指向5.6.22, 用mysql.server命令啟動mysql, 這個時候報錯了,啟動不了:
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/xxx.local.pid). 此處的 xxx是我電腦的名字,下同
這個時候先不要去搜索引擎搜索以上的錯誤提示,不然會找到很多不同的無效的解決方案,要定位問題還是先查看日志,避免做無用功. 我剛開始就是這么做的,浪費了不少時間.
查看日志/usr/local/var/mysql/xxx.local.err, 發現以下問題:
2016-08-03 18:18:59 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-08-03 18:18:59 81707 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2016-08-03 18:18:59 81707 [Note] Plugin 'FEDERATED' is disabled.
2016-08-03 18:18:59 81707 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-08-03 18:18:59 81707 [Note] InnoDB: The InnoDB memory heap is disabled
2016-08-03 18:18:59 81707 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-08-03 18:18:59 81707 [Note] InnoDB: Memory barrier is not used
2016-08-03 18:18:59 81707 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-08-03 18:18:59 81707 [Note] InnoDB: Using CPU crc32 instructions
2016-08-03 18:18:59 81707 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-08-03 18:18:59 81707 [Note] InnoDB: Completed initialization of buffer pool
2016-08-03 18:18:59 81707 [Note] InnoDB: Highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html
2016-08-03 18:18:59 81707 [ERROR] Plugin 'InnoDB' init function returned error.
2016-08-03 18:18:59 81707 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-08-03 18:18:59 81707 [ERROR] Unknown/unsupported storage engine: InnoDB
2016-08-03 18:18:59 81707 [ERROR] Aborting
重點在:
InnoDB: to create the InnoDB data files, but log file creation failed.
通過這個關鍵點 google 了一下, 找到解決方法:
刪除ib_logfile0和ib_logfile1這兩個文件,不過最好是重命名這兩個文件,就算此方案無效, 還有補救的機會. 接著再啟動mysql服務器, ok 了.
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的brew mysql 无法启动_MAC OSX brew 升级 mysql5.6到5.7无法启动的问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: qmake 没有生成.o文件_qmake
- 下一篇: clickhouse日期函数