created batch script to initialize the database.

pull/67/MERGE
winnerineast 2021-10-01 13:45:30 +08:00
parent 53b30a9b4f
commit 4a8f06af83
2 changed files with 15 additions and 1 deletions

View File

@ -13,7 +13,7 @@ Providing database schema and scripts for MyEMS.
### Installation
Execute the following scripts in MySQL commandline, or execute in other MySQL client tools such as MySQL Workbench, Navicat, DBaver, phpMyAdmin, etc.
Execute the following scripts in MySQL commandline, or execute in other MySQL client tools such as MySQL Workbench, Navicat, DBaver, phpMyAdmin, etc. Here is [an example shell script](create_database_ubuntu.sh) to initiate database in one command on Ubuntu 20.04.
```bash
mysql -u root -p < myems_billing_baseline_db.sql
mysql -u root -p < myems_billing_db.sql

View File

@ -0,0 +1,14 @@
#!/bin/sh
mypassword="pAssw0rd@12345"
mysql -uroot -p$mypassword < myems_billing_baseline_db.sql
mysql -uroot -p$mypassword < myems_billing_db.sql
mysql -uroot -p$mypassword < myems_energy_baseline_db.sql
mysql -uroot -p$mypassword < myems_energy_db.sql
mysql -uroot -p$mypassword < myems_fdd_db.sql
mysql -uroot -p$mypassword < myems_historical_db.sql
mysql -uroot -p$mypassword < myems_reporting_db.sql
mysql -uroot -p$mypassword < myems_system_db.sql
mysql -uroot -p$mypassword < myems_user_db.sql
mysql -uroot -p$mypassword < demo/myems_system_db.sql