Ubuntu18.04安装mysql - 百年刘傲天

in Ubuntu with 0 comment

在Ubuntu18.04上安装mysql

第一步

sudo apt update
sudo apt install mysql-server

安装成功

配置Mysql

sudo mysql_secure_installation
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD PLUGIN 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 plugin?
Press y|Y for Yes, any other key for No:  N(我选的N
New password:toor (我设置的密码
Re-enter new password:toor (再次输入你的密码
...
...
Remove anonymous users? (Press y|Y for Yes, any other key for No) : N (我的选项
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : N (我的选项,我想可以远程登陆
...
...
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : N
... skipping.
All done!

配置完成

Responses