update syntax
This commit is contained in:
parent
c8a897f741
commit
2b8e6c5ca6
@ -4,26 +4,26 @@ title: MySQL - Gestion des utilisateurs
|
|||||||
format: Markdown
|
format: Markdown
|
||||||
...
|
...
|
||||||
|
|
||||||
### Obtenir la liste des utilisateurs
|
#### Obtenir la liste des utilisateurs
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mysql> SELECT User, Host from mysql.user;
|
mysql> SELECT User, Host from mysql.user;
|
||||||
```
|
```
|
||||||
|
|
||||||
### Créer un nouvel utilisateur
|
#### Créer un nouvel utilisateur
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mysql> CREATE USER `<user>`@`<host>` IDENTIFIED BY `<password>`;
|
mysql> CREATE USER `<user>`@`<host>` IDENTIFIED BY `<password>`;
|
||||||
```
|
```
|
||||||
|
|
||||||
### Affecter des droits à un utilisateur
|
#### Affecter des droits à un utilisateur
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mysql> GRANT ALL PRIVILEGES ON <database>.* TO `<user>`@`<host>` IDENTIFIED BY `<password>`;
|
mysql> GRANT ALL PRIVILEGES ON <database>.* TO `<user>`@`<host>` IDENTIFIED BY `<password>`;
|
||||||
mysql> FLUSH PRIVILEGES;
|
mysql> FLUSH PRIVILEGES;
|
||||||
```
|
```
|
||||||
|
|
||||||
### Vérifier les droits d'un utilisateur
|
#### Vérifier les droits d'un utilisateur
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mysql> SHOW GRANTS FOR `<user>`@`<host>`;
|
mysql> SHOW GRANTS FOR `<user>`@`<host>`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user