Applicable to:
- Plesk
Symptoms
-
Plesk server is integrated with external database server;
-
The connection to the database in Plesk > Tools & Settings > Database Servers is shown as failed;
-
Another database server with a new IP address is already added connected with Plesk and has several new databases;
Cause
The external database server changed its IP address and lost integration with Plesk.
Resolution
Change integration information from old databases to the new database server
-
Navigate to Tools & Settings > Database Servers
-
Click on Add Database Server, specify the server's type, access details and click on Ok
-
Create Plesk database backup:
C:\> plesk db dump > psa_backup.sql
-
Access Plesk database:
C:\> plesk db
-
Find the required server ID:
MYSQL_WIN: SELECT id,host,type FROM psa.DatabaseServers;
+----+------------------+-------+
| id | host | type |
+----+------------------+-------+
| 1 | localhost | mysql |
| 3 | 203.0.113.2,1433 | mssql |
| 5 | 203.0.113.3,1433 | mssql |
+----+------------------+-------+
3 rows in set (0.00 sec)Note: In this example, databases and users hosted on the database server with ID 3 will be moved to ID 5.
-
Use these IDs to change current databases reference:
MYSQL_WIN: UPDATE psa.db_users SET db_server_id = 5 WHERE db_server_id = 3;
MYSQL_WIN: UPDATE psa.data_bases SET db_server_id = 5 WHERE db_server_id = 3;
-
Verify the connection and database count: Log in to Plesk > Tools & Settings > Database Servers and remove unnecessary connection by selecting it and clicking on Remove.
Comments
0 comments
Please sign in to leave a comment.