mac上安装mysql 8.0.12
1、打开终端
2、执行安装命令“brew install mysql”
3、执行启动命令“brew services start mysql”, 重启命令“brew services restart mysql”,停止命令“brew services stop mysql”
4、执行设置密码命令“mysql_secure_installation”;随后按照提示说明设置即可
5、远程连接设置,启动MySql 服务;执行mysql -u root -p,输入密码;use mysql; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';