安装:brew install mysql
    启动:brew services start mysql
    关闭:brew services stop mysql

    登陆:默认没有root用户密码,登陆命令 mysql -uroot
    设置登陆密码:

    1. alter user 'root'@'localhost' identified with mysql_native_password by 'admin';
    2. flush privileges;

    mysql