Outils pour utilisateurs

Outils du site


mariadb_user

Ceci est une ancienne révision du document !


Gestion des utilisateurs mariaDB

Création d'un user

MariaDB [(none)]> CREATE USER foo@'10.%' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0,003 sec)
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
MariaDB [mysql]> select Host, User, Password from user;
+-----------+-------------+-------------------------------------------+
| Host      | User        | Password                                  |
+-----------+-------------+-------------------------------------------+
| localhost | mariadb.sys |                                           |
| localhost | root        | invalid                                   |
| localhost | mysql       | invalid                                   |
| 10.%      | foo         | *2470C0C02FEE4B9D15ADC618B6DD1900A2EC9E19 |
+-----------+-------------+-------------------------------------------+
4 rows in set (0,002 sec)

Suppression d'un user

MariaDB [(none)]> DROP USER foo@'10.%';
Query OK, 0 rows affected (0,002 sec)
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
MariaDB [mysql]> select Host, User, Password from user;
+-----------+-------------+----------+
| Host      | User        | Password |
+-----------+-------------+----------+
| localhost | mariadb.sys |          |
| localhost | root        | invalid  |
| localhost | mysql       | invalid  |
+-----------+-------------+----------+
3 rows in set (0,002 sec)

Suppression d'un user

MariaDB [(none)]> DROP USER foo@'10.%';
Query OK, 0 rows affected (0,002 sec)
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
MariaDB [mysql]> select Host, User, Password from user;
+-----------+-------------+----------+
| Host      | User        | Password |
+-----------+-------------+----------+
| localhost | mariadb.sys |          |
| localhost | root        | invalid  |
| localhost | mysql       | invalid  |
+-----------+-------------+----------+
3 rows in set (0,002 sec)

Sources

Sujets connexes

mariadb_user.1688575895.txt.gz · Dernière modification : 2023/07/05 16:51 de pascal