Merge pull request #16 from KevinRamharak/patch-5

makes it way easier to do a fresh install
This commit is contained in:
Simon Fortier 2018-01-20 09:51:17 -05:00 committed by GitHub
commit d6bcb2e365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 13 deletions

View File

@ -8,19 +8,11 @@ Installation instructions:
```bash
$ pwd
~/Much-Assembly-Required-Frontend/
$ mysql -u root -p
Enter password: # type your MySQL root user password
MariaDB [(none)]>
MariaDB [(none)]> CREATE DATABASE mar;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON mar.* to 'mar'@'localhost' identified by 'mar';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> USE mar;
MariaDB [mar]> \. database.sql
MariaDB [(none)]> exit
Bye
$ # if '\. database.sql' failed you were not in the right directory. make sure you are in the repo root directory
$ # before running these commands
$ mysql -u root -p < database.sql
Enter password: # type your MySQL root user password if you set any
# on a fresh install the password is empty
# NOTE: on a fresh install you might have to run the command with sudo
# NEVER blindly run commands as sudo. Check the contents of the 'database.sql' file first!
```
Running instructions:

View File

@ -1,3 +1,14 @@
-- make sure it exists
create database if not exists mar;
-- create user (will be created if not exists) and grant privileges
grant all privileges on `mar`.* to `mar`@`localhost` identified by 'mar';
flush privileges;
-- switch to use the database
use mar;
-- create tables
create table mar_user
(
username varchar(20) not null