1.输入命令下载Mysql安装包 sudo apt-get install mysql-server mysql-client
2.安装完成后查看Mysql默认用户名和密码 sudo cat /etc/mysql/debian.cnf
3.修改root远程登录的ip为%,意思是允许所有的ip远程访问
4.修改root用户密码 update user set authentication_string='xxxxx' where user='root';
5.修改完成后换root 用户登录 sudo mysql -uroot -p