前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >MAC OSX brew 升级 mysql5.6到5.7无法启动的问题

MAC OSX brew 升级 mysql5.6到5.7无法启动的问题

作者头像
zcqshine
发布2018-05-11 15:55:36
1.4K0
发布2018-05-11 15:55:36
举报
文章被收录于专栏:zcqshine's blogzcqshine's blog

brewmysql 从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, 发现以下问题:

代码语言:javascript
复制
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_logfile0ib_logfile1这两个文件,不过最好是重命名这两个文件,就算此方案无效, 还有补救的机会. 接着再启动mysql服务器, ok 了.

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云数据库 SQL Server
腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档