在Ubuntu中安装和配置MySQL 20.04
#ubuntu #mysql #安装 #configure

请按照逐步命令

sudo apt update
sudo apt install mysql-server

安装后,请按照以下步骤进行操作:

sudo mysql

现在更新root用户的本机插件

USE mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
FLUSH PRIVILEGES;

现在使用以下命令更改密码:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password_here';

现在重新启动您的MySQL服务

sudo service mysql restart

运行以下命令以连接MySQL Workbench以正确工作

sudo snap connect mysql-workbench-community:password-manager-service
sudo snap connect mysql-workbench-community:ssh-keys