diff --git a/database/README.md b/database/README.md index 2a120a8e..a31696e3 100644 --- a/database/README.md +++ b/database/README.md @@ -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 diff --git a/database/create_database_ubuntu.sh b/database/create_database_ubuntu.sh new file mode 100644 index 00000000..ab4063bb --- /dev/null +++ b/database/create_database_ubuntu.sh @@ -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 \ No newline at end of file