加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

Linux 上安装 Mysql 设置root密码问题

发布时间:2020-12-13 23:48:57 所属栏目:Linux 来源:网络整理
导读:? Ubuntu?18.10.1 Mysql?5.7.26-0 ? 1. 安装mysql apt-get install mysql-server ? 安装完可以直接使用,但是新版本在安装过程中没有提示设置root用户密码,使用如下方法设置: sudo mysql_secure_installation ? 过程中提示是否开启 VALIDATE PASSWORD PLUG

?

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 passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes,any other key for No: 

?

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

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

Please enter 0 = LOW,1 = MEDIUM and 2 = STRONG: 

?

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

Please set the password for root here.

New password: 

Re-enter new password: 

?

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

Estimated strength of the password: 50 
Do 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 for No) : y
Success.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读