Overview
If the system is configured with an external database, the project connects to the external database every time it starts.
If you have directly modified the username and password of the external database, the project will fail to connect to the external database and thus fail to start.
This document describes how to correctly change the username and password of an external database and provides solutions for issues caused by incorrect changes.
Modification Method
This document provides two methods for changing the username and password of the external database.
Method One: No Migration Required
Note: 1. This method applies only to standalone projects.
When changing the account password in a cluster environment, you need to stop all other nodes and keep only one node running.
After the password is changed successfully, copy the db.properties file to other unmodified nodes. Then, restart all cluster nodes for the changes to take effect.
2. Before changing the password, back up the original project in case the operation fails.
For details about how to back up the project, see Backup and Restoration.
1. Start the project, log in to the decision-making platform as the admin, and choose System Management > System Setting > General > External Database, as shown in the following figure.

2. Click Configured to open the External Database Configuration page.

3. Change the username and password of the database.

4. On the External Database Configuration page, enter the new username and password, untick Migrate data to the database you want to enable, and click Enable a new database. If the database is enabled successfully, the change takes effect.

Method Two: Temporary Migration
Note: Before changing the password, back up the original project in case the operation fails.
For details about how to back up the project, see Backup and Restoration.
1. Prepare an empty database that is not related to the external database whose username and password are to be changed.
2. Migrate the external database to the new database following the instructions in the relevant document. With this method, you must tick Migrate data to the database you want to enable.
| Database Type | Migration Method |
|---|---|
MySQL | Configuring MySQL5 Databases |
SQL Server | |
Oracle | |
Db2 | |
PostgreSQL |
3. Change the username and password of the original external database.

4. After modification, follow step two to migrate the external database back to the original database. Remember to tick Migrate data to the database you want to enable.
Solution
If you have changed the username or password of the external database without following the instructions in the "Modification Method" section, the project may fail to start.
When the project fails to start, you will be automatically redirected to the Server Deployment Wizard page, which displays error messages indicating that the connection to the external database failed due to an exception, as shown in the following figure.
This section describes the solution to this issue.

Solution One: Restoring the Previous Username and Password
1. Contact the database administrator to restore the username and password of the external database.
2. After the project starts normally, follow the instructions in the "Modification Method" section to change the username and password of the external database.
Method Two: Using Server Deployment Wizard
On the Server Deployment Wizard page, reconfigure the external database.
