1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2024-11-26 20:47:10 +00:00

Blame MySQL

This commit is contained in:
Yohann D'ANELLO 2020-02-09 17:30:13 +01:00
parent a5c560307a
commit 0f0e5fcd25
2 changed files with 6 additions and 26 deletions

View File

@ -86,21 +86,12 @@ on configure donc ensuite Django et une base de données.
Sur le serveur MySQL ou PostgreSQL, il est nécessaire de créer une base de donnée med,
ainsi qu'un user med et un mot de passe associé.
Voici les étapes à executer pour MySQL :
Voici les étapes à executer pour PostgreSQL :
```SQL
CREATE DATABASE `club-med-cartons` CHARACTER SET utf8;
CREATE USER `club-med-cartons`@`localhost` IDENTIFIED BY 'MY_SUPER_SECRET_PASSWORD'
GRANT ALL PRIVILEGES ON `club-med-cartons`.* TO `club-med-cartons`@`localhost`;
FLUSH PRIVILEGES;
```
Et pour PostgreSQL :
```SQL
CREATE DATABASE med;
CREATE USER med WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE med TO med;
CREATE DATABASE "club-med";
CREATE USER "club-med" WITH PASSWORD 'MY-STRONG-PASSWORD';
GRANT ALL PRIVILEGES ON DATABASE "club-med" TO "club-med";
```
## Exemple de groupes de droits

View File

@ -33,21 +33,10 @@ DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'med',
'USER': 'med',
'NAME': 'club-med',
'USER': 'club-med',
'PASSWORD': 'password_to_store_in_env',
'HOST': 'db',
'PORT': '',
}
}
# or MySQL database for Zamok
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'club-med',
# 'USER': 'club-med',
# 'PASSWORD': 'CHANGE ME !!!',
# 'HOST': 'localhost',
# },
# }