diff --git a/mysql/size.md b/mysql/size.md index ebeaad8..5a8805a 100644 --- a/mysql/size.md +++ b/mysql/size.md @@ -1,4 +1,6 @@ --- +categories: databases +title: MySQL : Taille des bases de données et tables format: markdown ... diff --git a/mysql/user.md b/mysql/user.md new file mode 100644 index 0000000..a53454b --- /dev/null +++ b/mysql/user.md @@ -0,0 +1,31 @@ +--- +categories: databases +title: MySQL : Gestion des utilisateurs +format: markdown +... + + +## Obtenir la liste des utilisateurs + +```bash +mysql> SELECT User, Host from mysql.user; +``` + +## Créer un nouvel utilisateur + +```bash +mysql> CREATE USER ``@`` IDENTIFIED BY ``; +``` + +## Affecter des droits à un utilisateur + +```bash +mysql> GRANT ALL PRIVILEGES ON .* TO ``@`` IDENTIFIED BY ``; +mysql> FLUSH PRIVILEGES; +``` + +## Vérifier les droits d'un utilisateur + +```bash +mysql> SHOW GRANTS FOR ``@``; +```