ScadaBR currently supports three DataBase Management Systems (DMBS): MySQL, PostgreSQL and Derby.
The file ScadaBR.war comes standard configured with Derby for reasons of user friendliness because it requires no embedded DBMS installation or configuration parameters like username and password.
Choose one of the two possibilities: 8.1.1. or 8.1.2.
Edit the <tomcat-webapps>/<ScadaBR_home>/WEB-INF/classes/env.properties file. By default the settings of concern will be:
db.type=derby db.url=~/../../bin/scadabrDB db.username= db.password=
You will have existing "db." entries in there that point to the Derby database. Prepend these entries with "convert." They will then look something like this:
convert.db.type=derby convert.db.url=~/../../bin/scadabrDB convert.db.username= convert.db.password=
Note: You may only have the "url" entry. This is fine.
Than add entries that point to your MySQL instance. The following are examples. Modify them to suit your environment.
db.type=mysql db.url=jdbc:mysql://localhost/mango db.username=<mysql username> db.password=<mysql password> db.pool.maxActive=10 db.pool.maxIdle=10
Note: The url to mysql will look something like this: db.url=jdbc:mysql://localhost/mango
Save the changes and restart ScadaBR.
Watch the console messages. You will be given information on the steps and progress of the conversion as it occurs. Depending on the size of your Derby database and the power of your hardware this process could take seconds or hours.
Note: If you have any problems during the conversion (e.g. a power failure, and error, etc), you can always restart the process by dropping all of the tables that ScadaBR created in your MySQL schema and restarting ScadaBR.
Unzip ScadaBR.war file to a directory <scadabr>. (You may rename the file toScadaBR.zip and then extract it).
Open with a text editor the file: <scadabr>/WEB-INF/classes/env.properties and edit it as follows.
db.type=mysql db.url=jdbc:mysql://localhost/mango db.username=<mysql username> db.password=<mysql password> db.pool.maxActive=10 db.pool.maxIdle=10
Save the file, compress the entire folder <scadabr> to ScadaBR.war again and perform the installation.