mysql 安装no key_Linux 上安装 Mysql 设置root密码问题

Ubuntu 18.10.1

Mysql 5.7.26-0

1. 安装mysql

apt-get install mysql-server

安装完可以直接使用,但是新版本在安装过程中没有提示设置root用户密码,使用如下方法设置:

sudo mysql_secure_installation

过程中提示是否开启 VALIDATE PASSWORD PLUGIN,就是设置密码强度检查,自行选择:

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 passwordswhichare

secure enough. Would you like to setup VALIDATE PASSWORD plugin?Press y|Y for Yes, any other key for No:

选择是的话会让你选择等级:

LOW Length >= 8MEDIUM Length>= 8, numeric, mixed case, and special characters

STRONG Length>= 8, numeric, mixed case, special characters and dictionary filePlease enter0 = LOW, 1 = MEDIUM and 2 = STRONG:

然会会让你输入root密码,注意一定要符合上面你选择的要求:

Please set the password forroot here.

New password:

Re-enter new password:

输入完之后会显示你的密码的安全性,并提示你是否确认使用这个:

Estimated strength of the password: 50Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y

之后就是一些其他方面的设置。。。

最后注意会提示你是否重新加载权限表格:

Reload privilege tables now? (Press y|Y for Yes, any other key forNo) : y

Success.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值