相关命令:
brew install mysql
msql.server stop
mkdir /data5/mysql
rm -rf /data5/mysql/*
mysqld --initialize-insecure --user=mysql --datadir=/data5/mysql
brew services start mysql
mysql.server start
mysql -uroot
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
mysql -uroot -proot
来源:oschina
链接:https://my.oschina.net/ooxxx/blog/4257158