需要先安装brew
更新brew
brew update
安装MariaDB
brew install MariaDB
启动服务、停止服务、查看运行状态
brew services start mariadb
brew services stop mariadb
brew services info mariadb
登录MariaDB(密码为电脑开机密码)
mysql -uroot -p
将root的密码设为root
grant all privileges on *.* to root@localhost identified by 'root';