获取mysql
sudo apt-get install mysql-server mysql-client;
用sudo免密登录:
sudo mysql;
mysql 8.0以上修改密码的方式是:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '需要设置的密码';