Ubuntu Server 20.04 更新软件源之后,运行命令安装mysql 8 sudo apt install mysql-server 启动mysql服务 sudo service mysql start 安装完后 ,下面命令直接登录 sudo mysql 修改密码。 alter user 'root'@'localhost' identified by '{密码}'; 添加远程权限。mysql_native_password可以避免远程客户