2BizBox® Manual |
Go back to
|
2.3 Database Confirguration
By default, 2BizBox uses its own MySQL as the database server. To maintain the security of data, it is strongly suggested to change the default password of the MySQL database.
2.3.1 Change database account/password
While installing 2BizBox server, 2BizBox uses a built-in MySQL database. Change the database username and password by following the step-by-step guide below:
- Start 2BizBox MySQL database. Run “run_database.bat” at “…2BizBox ERP/server/bin” and system will start MySQL server automatically and a window will pop up to show MySQL running on port 3307. Close the window to stop MySQL server.
- Change MySQL password. Open system command window (With Windows System, click “Start -> Run,” input “CMD” then press ‘Enter’), go to path: “…2BizBox ERP/server/db/bin” and run command: “MySQLadmin -uroot –proot –P3307 password‘new_password’” to change the password, in which‘new_password’ is the new password. Meanwhile, user can login to MySQL database, and execute command: update user set password=password(‘new_password’) where user=‘root’ to update username root’s password.
- Login to MySQL database. Go to path: “…2BizBox/Server/db/bin,” execute “MySQL -uroot -p -P3307” and input root password.
- Create a new MySQL user. Ensure the new created user has permission to operate database with bb2_* prefix.
- Edit configuration file. Modify tag value of user and password in the file: “…/server/jboss/server/default/deploy/MySQL-ds.xml” and replace them with a new username and password.
2.3.2 Change database
Generally, the system uses a default MySQL database. If you want to change it into another MySQL database, follow the steps below:
- Import database into target database by running script: server/db/database.sql.
- Update file server. /server/default/deploy/MySQL-ds.xml. Search all tags, change local host and 3307 into new target MySQL server’s IP address and port number.
- Search all tags. Change User Name and password to your target MySQL server’s Username and password.
- Change start file, remove the relationship with built-in MySQL database. Open the file “server/run.bat” and delete the “db.bat” at the beginning of the second line.
Note: ensure that the new target MySQL server begins running before starting the 2BizBox server.