本文介绍了无法在Mac上启动Mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Brew安装后,我无法使Mysql运行.我正在使用OS X El Capitan版本10.11.3和Mysql Server版本5.7.11.当我启动服务器时,我收到:

I'am not able to get Mysql running after installation using Brew. I'am using OS X El Capitan Version 10.11.3 and Mysql Server version 5.7.11. When I start the server I receive:

这是我在err文件中得到的:

and this what I get in my err file:

2016-03-19T20:59:45.907542Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable

有人以前有这个吗?非常感谢.

Does any one have got this before ?Many thanks.

推荐答案

更新自制软件后,我收到了同样的错误.

I received this same error after updating homebrew.

要解决此问题,我必须重置mysql数据目录的所有者,更新后将其更改回我的用户ID.

To fix this I had to reset the owner of the mysql data dir, it was changed back to my userid after the update.

cd /usr/local/mysql
sudo chown -R _mysql data/

假设您的mysql home目录位于/usr/local

Assuming your mysql home dir is in /usr/local

此后,重新启动服务即可

After this a restart of the service worked

$ sudo /usr/local/mysql/support-files/mysql.server start
Starting MySQL
. SUCCESS!

这篇关于无法在Mac上启动Mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 18:59