首页 > 数据库技术 > 详细

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

时间:2019-06-16 14:32:27      阅读:204      评论:0      收藏:0      [点我收藏+]

 

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, numeric, 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.

 

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

原文:https://www.cnblogs.com/zoneofmine/p/11031146.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!