Outils pour utilisateurs

Outils du site


linux:mariadb (lu 35614 fois)

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision Les deux révisions suivantes
linux:mariadb [10-09-2017 17:59]
edmc73 créée
linux:mariadb [07-06-2018 15:50]
edmc73
Ligne 18: Ligne 18:
 Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec)
  
 +</code>
 +
 +===== Commandes =====
 +
 +Voir la liste des users
 +
 +<code>
 +mysql> select host,user from mysql.user;
 ++-----------+------------------+
 +| host      | user             |
 ++-----------+------------------+
 +| %         | toto             |
 +| 127.0.0.1 | root             |
 +| ::1       | root             |
 +| debian    | root             |
 +| localhost | api              |
 +| localhost | debian-sys-maint |
 +| localhost | root             |
 ++-----------+------------------+
 +</code>
 +
 +
 +
 +Voir les privilèges
 +
 +<code>
 +mysql> SELECT * FROM information_schema.user_privileges;
 ++--------------------------------+---------------+-------------------------+--------------+
 +| GRANTEE                        | TABLE_CATALOG | PRIVILEGE_TYPE          | IS_GRANTABLE |
 ++--------------------------------+---------------+-------------------------+--------------+
 +| 'root'@'localhost'             | def           | SELECT                  | YES          |
 +| 'root'@'localhost'             | def           | INSERT                  | YES          |
 +| 'root'@'localhost'             | def           | UPDATE                  | YES          |
 +| 'root'@'localhost'             | def           | DELETE                  | YES          |
 +| 'root'@'localhost'             | def           | CREATE                  | YES          |
 +| 'root'@'localhost'             | def           | DROP                    | YES          |
 +| 'root'@'localhost'             | def           | RELOAD                  | YES          |
 +| 'root'@'localhost'             | def           | SHUTDOWN                | YES          |
 +| 'root'@'localhost'             | def           | PROCESS                 | YES          |
 +...
 +</code>
 +
 +
 +<code>
 +mysql> show grants for 'root'@'localhost';
 ++----------------------------------------------------------------------------------------------------------------------------------------+
 +| Grants for root@localhost                                                                                                              |
 ++----------------------------------------------------------------------------------------------------------------------------------------+
 +| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*XXXXXXXXXXXXXXXXXXXXxxx' WITH GRANT OPTION |
 +| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION                                                                           |
 ++----------------------------------------------------------------------------------------------------------------------------------------+
 </code> </code>
linux/mariadb.txt · Dernière modification: 01-02-2021 22:26 de edmc73