Follow me on GitHub

mariadb-server-10.3.28-1 无法重设 root 密码

新版 mariadb 无法通过修改 password 字段完成密码重设

新的字段已被改为 authentication_string

新的命令为

MariaDB [(none)]> UPDATE mysql.user SET authentication_string=PASSWORD('redhat') WHERE User='root'; 
Query OK, 1 row affected (0.000 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [(none)]> 
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> Bye
(完)
posted @ 2021-05-30 21:30  季文康  阅读(19)  评论(0编辑  收藏  举报