mariadb-secure-installation
命令一樣,再沒先執行 alter 命令變更密碼前一樣不生效,以下操作是已用 alter 改過密碼後,再使用 mysqladmin 變更 root 密碼回 123qwe。
[root@kvm3 ~]# mysqladmin -uroot -pqweqwe password '123qwe'
[root@kvm3 ~]# mariadb -uroot -pqweqwe ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
[root@kvm3 ~]# mariadb -uroot -p123qwe Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 18 Server version: 10.5.16-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> quit Bye