MariaDB、MySQLでユーザー一覧を確認する | ex1-lab

MariaDB、MySQLでユーザー一覧を確認する

2021-06-28

MariaDB、MySQLで設定しているユーザーを確認するコマンドです。MySQLとMariaDBとも共通で「select Host, User, Password from mysql.user;」で確認ができます。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
MariaDB [(none)]> select Host, User, Password from mysql.user;
+-----------+----------------+-------------------------------------------+
| Host | User | Password |
+-----------+----------------+-------------------------------------------+
| localhost | root | *A115B578EXXXXXXXXXXX2A9640B6XXXXXXXXXXXX |
| 127.0.0.1 | root | *A115B578EXXXXXXXXXXX2A9640B6XXXXXXXXXXXX |
+-----------+----------------+-------------------------------------------+
7 rows in set (0.00 sec)
MariaDB [(none)]> select Host, User, Password from mysql.user; +-----------+----------------+-------------------------------------------+ | Host | User | Password | +-----------+----------------+-------------------------------------------+ | localhost | root | *A115B578EXXXXXXXXXXX2A9640B6XXXXXXXXXXXX | | 127.0.0.1 | root | *A115B578EXXXXXXXXXXX2A9640B6XXXXXXXXXXXX | +-----------+----------------+-------------------------------------------+ 7 rows in set (0.00 sec)
MariaDB [(none)]> select Host, User, Password from mysql.user;
+-----------+----------------+-------------------------------------------+
| Host      | User           | Password                                  |
+-----------+----------------+-------------------------------------------+
| localhost | root           | *A115B578EXXXXXXXXXXX2A9640B6XXXXXXXXXXXX |
| 127.0.0.1 | root           | *A115B578EXXXXXXXXXXX2A9640B6XXXXXXXXXXXX |
+-----------+----------------+-------------------------------------------+
7 rows in set (0.00 sec)

スポンサーリンク

0
0