1、从官网下载并安装;
2、配置环境变量并启动mysql服务:
PATH="$PATH":/usr/local/mysql/bin
echo $PATH
sudo /usr/local/mysql/support-files/mysql.server start
3、启动mysql。修改默认root密码
mysql -u root -p
set PASSWORD =PASSWORD(‘ your password‘)
原文:https://www.cnblogs.com/ValyrianSteel/p/11338961.html