1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
vim /etc/apt/source.list
:1,$s/cn.archive.ubuntu.com/mirrors.aliyun.com/g
apt-get update
apt install mysql-server -y systemctl status mysql systemctl enable mysql
mysql -u root -p
alter user 'root'@'localhost' identified by "root"; flush privileges;
update user set host='%' where user='root' and host='localhost'; alter user 'root'@'%' identified with mysql_native_password by 'abc123' flush privileges
vim /etc/mysql/mysql.conf.d/mysqld.cnf
systemctl restart mysql
|