前言
本文基于Ubuntu20.04 LST 以及MySQL 8.0.29,可视化工具使用mysql-workbench-community_8.0.29-1ubuntu20.04_amd64.deb
安装步骤
1.安装MySQL
sudo apt-get update #获取最新的软件源
sudo apt-get install mysql-server #安装mysql
启动与关闭MySQL
service mysql start #启动MySQL
service mysql stop #关闭MySQL
2.配置MySQL
开始配置:
sudo mysql_secure_installation
...
# 1.询问是否安装密码插件,我选择 No
VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?
Press y|Y for Yes, any other key for No: n
# 2.为root用户设置密码
Please set the password for root here.
New password:
Re-enter new password:
#2.1 解决方法详见下一小节,解决bug
... Failed