-
Notifications
You must be signed in to change notification settings - Fork 4
/
database-creation.sql
21 lines (15 loc) · 1.12 KB
/
database-creation.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Execute by hand to create the required local database for testing purposes */
DROP DATABASE IF EXISTS `hapiestmysql`;
CREATE DATABASE IF NOT EXISTS `hapiestmysql` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
/* User for API server connecting to database when collocated; probably only used for local dev */
GRANT ALL ON `hapiestmysql`.* to 'hapiestmysql'@'%' IDENTIFIED BY 'hapiestmysql';
GRANT ALL ON `hapiestmysql`.* to 'hapiestmysql'@'localhost' IDENTIFIED BY 'hapiestmysql';
GRANT ALL ON `hapiestmysql`.* to 'hapiestmysql'@'127.0.0.1' IDENTIFIED BY 'hapiestmysql';
FLUSH PRIVILEGES;
DROP DATABASE IF EXISTS `hapiestmysql_test`;
CREATE DATABASE IF NOT EXISTS `hapiestmysql_test` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
/* User for API server connecting to database when collocated; probably only used for local dev */
GRANT ALL ON `hapiestmysql_test`.* to 'hapiestmysql'@'%' IDENTIFIED BY 'hapiestmysql';
GRANT ALL ON `hapiestmysql_test`.* to 'hapiestmysql'@'localhost' IDENTIFIED BY 'hapiestmysql';
GRANT ALL ON `hapiestmysql_test`.* to 'hapiestmysql'@'127.0.0.1' IDENTIFIED BY 'hapiestmysql';
FLUSH PRIVILEGES;