23 lines
493 B
Markdown
23 lines
493 B
Markdown

|
|
Instructions à suivre pour créer un utilisateur et sa base de données en requête SQL.
|
|
|
|
## MySQL et MariaDB
|
|
Les instructions sont testées sous
|
|
- MariadDB 10.1
|
|
- MariadDB 10.3
|
|
|
|
Les noms à adapter sont :
|
|
- ma_bdd
|
|
- mon_user
|
|
- mon_mdp
|
|
|
|
```SQL
|
|
CREATE DATABASE ma_bdd;
|
|
|
|
DROP USER IF EXISTS mon_user;
|
|
CREATE USER 'mon_user'@'localhost' IDENTIFIED BY 'mon_mdp';
|
|
|
|
GRANT ALL ON ma_bdd.* TO mon_user@localhost;
|
|
|
|
FLUSH PRIVILEGES;
|
|
``` |