After Ubuntu18.04 version can not be used to install mysql is not prompted to enter a password and other operations, so that the installation was successful root login
sudo apt-get install mysql-server # 安装mysql
First, we need to find the default account
sudo cat /etc/mysql/debian.cnf
Log in using the default account (the account password is the last step acquisition), reset the root account (execute the following statement) to
use mysql;
update mysql.user set authentication_string=password('123456') where user='root' and Host ='localhost'; #修改密码123456是密码
update user set plugin="mysql_native_password";
flush privileges;
quit;