deb http://mirrors.aliyun.com/ubuntu/ focal main restricted
universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted
universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main
restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main
restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted
universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main
restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main
restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main
restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main
restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main
restricted universe multiverse
#保存
:wq
#设置密码sudocat /etc/mysql/debian.cnf
mysql -u debian-sys-maint -p
步骤三
#授权
use mysql;
flush privileges;
ALTER USER'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
flush privileges;select host, user, authentication_string, plugin from user;
create user 'root'@'%' identified by 'root';
grant all privileges on *.* to 'root'@'%';
ALTER USER'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
flush privileges;exit;service mysql restart