安装MySQL
sudo apt install mysql-server
启动
sudo service mysql start
查看用户密码
sudo cat /etc/mysql/debian.cnf
使用该用户名和密码进入MySQL修改root密码
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '新密码';
刷新权限
FLUSH PRIVILEGES;
退出修改配置文件
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf