ubuntu server 20.04 安装mysql。
sudo apt install mysql-server mysql-client
没有提示设置密码。
sudo cat /etc/mysql/debian.cnf
使用这个账号登录
mysql -u debian-sys-maint -p
ALTER user ‘root’@‘localhost’ identified with caching_sha2_password by ‘123456’;
ubuntu server 20.04 安装mysql。
sudo apt install mysql-server mysql-client
没有提示设置密码。
sudo cat /etc/mysql/debian.cnf
使用这个账号登录
mysql -u debian-sys-maint -p
ALTER user ‘root’@‘localhost’ identified with caching_sha2_password by ‘123456’;