MariaDB 10.6にSET PASSWORD文でパスワードを変更する

環境
Windows 10 64bit
MariaDB 10.6.4

書式
SET PASSWORD FOR ユーザ名@ホスト名 = PASSWORD('新しいパスワード’);

使用例
1.パスワードを変更します

MariaDB [testdb]> SET PASSWORD FOR arkgame02@localhost = PASSWORD('456@#!');
Query OK, 0 rows affected (0.020 sec)

2.パスワード変更後ユーザは再度ログインします

>mysql -u arkgame02 -p
Enter password: ******
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 24
Server version: 10.6.4-MariaDB mariadb.org binary distribution

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)]>

 

MariaDB

Posted by arkgame