我在运行High Sierra的Mac上运行了很好的mysql,10.13.5。然而,昨晚,由于某种未知原因,系统在半夜重新启动,因此我无法恢复正常运行。
当我运行brew services start mysql
时,我得到:
Successfully started
的MySQL (label: homebrew.mxcl.mysql)
作出回应。但是,ps aux | grep mysql
显示没有正在运行的服务器,我无法登录到mysql。如果我跑,mysql.server start
我得到:
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/iMac-5K-3.local.pid).
错误文件内容如下:
2018-06-18T13:51:57.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/iMac-5K-3.local.pid ended
2018-06-18T13:52:07.6NZ mysqld_safe Logging to '/usr/local/var/mysql/iMac-5K-3.local.err'.
2018-06-18T13:52:07.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql
2018-06-18T13:52:07.837840Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-06-18T13:52:07.838096Z 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-06-18T13:52:07.838155Z 0 [Note] /usr/local/opt/mysql/bin/mysqld (mysqld 5.7.22) starting as process 8334 ...
2018-06-18T13:52:07.840681Z 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2018-06-18T13:52:07.841958Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-06-18T13:52:07.841975Z 0 [Note] InnoDB: Uses event mutexes
2018-06-18T13:52:07.841983Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-06-18T13:52:07.841990Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-06-18T13:52:07.842257Z 0 [Note] InnoDB: Number of pools: 1
2018-06-18T13:52:07.842356Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-06-18T13:52:07.843494Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-06-18T13:52:07.852043Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-06-18T13:52:07.901671Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-06-18T13:52:07.902006Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 2700829144 and the end 2700828672.
2018-06-18T13:52:07.902049Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-06-18T13:52:08.338717Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-06-18T13:52:08.338812Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-06-18T13:52:08.338823Z 0 [ERROR] Failed to initialize builtin plugins.
2018-06-18T13:52:08.338835Z 0 [ERROR] Aborting
2018-06-18T13:52:08.338849Z 0 [Note] Binlog end
2018-06-18T13:52:08.338929Z 0 [Note] Shutting down plugin 'CSV'
2018-06-18T13:52:08.339077Z 0 [Note] /usr/local/opt/mysql/bin/mysqld: Shutdown complete
2018-06-18T13:52:08.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/iMac-5K-3.local.pid ended
答案 0 :(得分:0)
我没有打扰第1步,因为我没有主/从设置。我刚刚做了:
mv /var/lib/mysql/ib_logfile* ~
我现在可以成功启动mysql。