# Copyright (C) 2015 David MAURER david@netdefi.com

# This file is part of "Online dating web site" documentation.
#
# Permission is granted to copy, distribute and/or modify this document
# under the terms of the GNU Free Documentation License, Version 1.3
# or any later version published by the Free Software Foundation;
# with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
# A copy of the license is included in the file COPYING.GFDL.

################################################################################
#                                                                              #
# purpose : to show a way of create the database.                              #
#                                                                              #
# objectif : montrer une façon de créer la base de données.                    #
#                                                                              #
################################################################################

:~$ mysql -u root -p
Enter password:

mysql> create database dating;
Query OK, 1 row affected (0.00 sec)

mysql> create user 'dating'@'localhost' identified by 'PASSWORD CHANGE IT !';
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

:~$ mysql -u root -p dating < online-dating/software/data/dating.sql
Enter password:

:~$ mysql -u root -p
Enter password:

mysql> grant select on dating.* to 'dating'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> grant insert on dating.membres to 'dating'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

:~$ nano online-dating/software/includes/database_settings.php
# CHANGE THE PASSWORD !
