Adding and Removing Database Servers
summary: In addition to the database server(s) hosted on the Plesk server itself, you can also register remote database servers hosted elsewhere. Once a remote database server is registered in Plesk, it can be used to host databases for any domain in Plesk.
In this topic you will learn how to add and remove remote database servers in Plesk.
Adding Remote Database Servers to Plesk
Before adding a remote database server to Plesk, you need to install it and set it up:
- Install a supported version of the desired database server on a remote server.
- Set up the database administrator’s account.
- Enable network access to the database server and make sure that it is accessible from the Plesk server.
To add a remote database server:
-
Go to Tools & Settings > Database Servers (under “Applications & Databases”), and then click Add Database Server.
-
Specify the properties of the database server:
-
Specify the database server engine in the Database server type box. The list contains database engines supported by your licence key. You can check what components are supported on the Tools & Settings > Licence Management page.
Note: To use Microsoft SQL Server with Plesk, you need to obtain Plesk Power Pack.
-
Specify the hostname or IP address of the database server.
-
Specify the port number the database server is listening on. This option is available only for MySQL/MariaDB. By default, MySQL/MariaDB servers listen on port 3306. You can leave the Port number box blank, if your MySQL/MariaDB database server is listening on the default port.
Note: Do not enter the value for MySQL/MariaDB server port equal to 8306, because it is used by Plesk for communication with its internal database.
-
To make this database server default for hosting customers’ databases, select the “Use this server as default for MySQL” or the “Use this server as default for MS SQL” checkbox.
-
Specify the database server administrator’s login and password.
-
-
Click OK.
If you have registered an SQL Server, you may want to provide its backup settings. For configuring the backup settings of a remote SQL Server, refer to Configuring Backup Settings for Remote SQL Servers.
Removing Database Servers from Plesk
You can remove a database server only if it is not the default server and there are no databases on it.
To remove a database server from Plesk:
- Go to Tools & Settings > Database Servers (under “Applications & Databases”).
- Select the checkbox to the right of the database server’s host name.
- Click Remove.
- Confirm the operation and click OK.
To remove a database server that has databases or is assigned as default for hosting customers’ databases:
- Delete databases from the database server:
- Go to Tools & Settings > Database Servers (under “Applications & Databases”).
- Click the host name of the database server that you want to remove from Plesk.
- Select the checkbox in the upper left corner of the list to select all databases.
- Click Remove.
- Confirm removal and click OK.
- Make another database server default:
- Click the Database servers shortcut in the path bar at the top of the screen.
- Click the host name of a database server that you wish to make default. This should be of the same database server type (MySQL/MariaDB or SQL Server) as the one you are going to delete.
- Click Preferences and select the Use this server as default for MySQL checkbox. If you have a SQL Server, select the Use this server as default for MS SQL checkbox.
- Click OK.
- Return to the list of database servers (Tools & Settings > Database Servers).
- Select a checkbox corresponding to the database server that you no longer need.
- Click Remove.
- Confirm the operation and click OK.
Note: You cannot remove databases used by web applications this way. To remove them, remove the respective web applications from the sites that use them first.