ubuntu18.04 apt install mysql5.7

Update source, perform the installation 

sudo apt update
sudo apt install mysql-server

Obtain a temporary password

sudo vim /etc/mysql/debian.cnf

 

Log mysql, copy and paste the password to enter your password below stage

mysql -u root -p

change Password

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Abc123456,';  

Allow remote connections

sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf

 Comment the following line bind ip # denotes a comment

bind-address            = 127.0.0.1
Published 242 original articles · won praise 13 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_41813208/article/details/103798280