mirror of
https://github.com/simon987/Much-Assembly-Required-Frontend.git
synced 2025-04-19 18:46:41 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
bf88eb87a2
18
README.md
18
README.md
@ -8,19 +8,11 @@ Installation instructions:
|
|||||||
```bash
|
```bash
|
||||||
$ pwd
|
$ pwd
|
||||||
~/Much-Assembly-Required-Frontend/
|
~/Much-Assembly-Required-Frontend/
|
||||||
$ mysql -u root -p
|
$ mysql -u root -p < database.sql
|
||||||
Enter password: # type your MySQL root user password
|
Enter password: # type your MySQL root user password if you set any
|
||||||
|
# on a fresh install the password is empty
|
||||||
MariaDB [(none)]>
|
# NOTE: on a fresh install you might have to run the command with sudo
|
||||||
MariaDB [(none)]> CREATE DATABASE mar;
|
# NEVER blindly run commands as sudo. Check the contents of the 'database.sql' file first!
|
||||||
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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Running instructions:
|
Running instructions:
|
||||||
|
11
database.sql
11
database.sql
@ -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
|
create table mar_user
|
||||||
(
|
(
|
||||||
username varchar(20) not null
|
username varchar(20) not null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user