Fedora 中无法更改 mysql root 密码

标签 mysql passwords fedora

由于mysql root密码默认为空,为了我的mysql数据库的安全,我决定为其创建一个密码。我尝试使用以下命令更改 root 密码:

sudo mysqladmin -u root -p password

在尝试更新密码后,它给了我这个警告和错误:

Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety. mysqladmin: unable to change password; error: 'Your password does not satisfy the current policy requirements'

我该怎么办?

请点击图片链接。

image

最佳答案

它告诉您无法设置您选择的密码,因为它的强度不足以满足策略要求。策略级别通过系统变量validate_password_policy进行配置,其作用如下:

0 or LOW    Length
1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters
2 or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file

(长度测试是 validate_password_length 的值。)

看起来默认级别为 MEDIUM,默认长度为 8,因此您需要一个至少包含数字和特殊字符的混合大小写密码。

所以,要么:

  1. 降低配置中的测试强度,或者
  2. 选择更强的密码(推荐)。

关于Fedora 中无法更改 mysql root 密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41630544/

相关文章:

php - 使用 PHP 将数组数据值插入 MySQL 数据库表

php - Mysql中条件相关查询

c - 用户名和密码验证 Turbo C

java - 如何使用java中的一些唯一 key 加密随机值

compilation -/usr/bin/ld : cannot find -latlas

python - python程序中Gst的问题

MYSQL 子查询 WHERE IN 与 count/having

php - 动态数据透视表 MySql

php - 这种密码存储方式安全吗?

linux - 在 fedora 上运行 gcc 获取 AVR