mac sierra mysql_安装后步骤未成功完成MySQL Mac OS Sierra

bd96500e110b49cbb3cd949968f18be7.png

[(pyEnv) Anants-MacBook-Pro:litibackend anantchandra$ brew postinstall mysql

==> Postinstalling mysql

==> /usr/local/Cellar/mysql/8.0.11/bin/mysqld --initialize-insecure --user=anantchandra --basedir=/usr/local/Cellar/mysql/8.0.11 --datadir=/usr/local/var/mysql --tmpdir=/tmp

Last 15 lines from /Users/anantchandra/Library/Logs/Homebrew/mysql/post_install.01.mysqld:

2018-06-15 04:41:04 -0700

/usr/local/Cellar/mysql/8.0.11/bin/mysqld

--initialize-insecure

--user=anantchandra

--basedir=/usr/local/Cellar/mysql/8.0.11

--datadir=/usr/local/var/mysql

--tmpdir=/tmp

2018-06-15T11:41:04.901191Z 0 [System] [MY-013169] [Server] /usr/local/Cellar/mysql/8.0.11/bin/mysqld (mysqld 8.0.11) initializing of server in progress as process 37841

2018-06-15T11:41:04.903504Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.

2018-06-15T11:41:04.903537Z 0 [ERROR] [MY-010119] [Server] Aborting

2018-06-15T11:41:04.903701Z 0 [System] [MY-010910] [Server] /usr/local/Cellar/mysql/8.0.11/bin/mysqld: Shutdown complete (mysqld 8.0.11) Homebrew.

Warning: The post-install step did not complete successfully

You can try again using `brew postinstall mysql`

解决方案

I was able to go back to 5.7 for anyone who wants to:

brew uninstall mysql

brew install mysql@5.7

brew link --force mysql@5.7

mysql.server start

mysql_secure_installation

After all that, I'm back in 5.7 with all my databases intact. In my case, I knew the data in the databases wasn't crucial, so I didn't attempt to backup the data in advance. Worked fine for me. If you have irreplaceable data in your local databases, you might want to tread carefully. I didn't lose data, but I don't want anyone else to lose data on my advice either. ;)

Normally, I don't mind a MySQL upgrade, but 8.0 looks to have compatibility issues I'd like to vet before going forward, and in the meantime, I'd rather be back on a version that doesn't force me to deal with those issues.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值