自动摘要
正在生成中……
实际启动命令为:
/usr/local/opt/mysql/bin/mysqld_safe --bind-address=0.0.0.0 --datadir=/usr/local/var/mysql
加入 --user=root 无效:
/usr/local/opt/mysql/bin/mysqld_safe --user=root --bind-address=0.0.0.0 --datadir=/usr/local/var/mysql
方法一:临时使用命令启动
sudo mysql.server start
方法二:mount -uw /
在Catalina
版本,使用者无法在只读系统卷进行数据的存储,使用root在通过命令行的方式也无法对/根目录下进行写操作了。
mount -uw /
注意此种方式如果重启,mount设定的/的write属性就会失去
最终解决方法
先停止服务 brew services stop mysql
- 修改
/usr/local/opt/mysql/bin/mysqld_safe
,将脚本中的 user='mysql'修改为 user='falcon' , falcon是我的用户名