Tutorials > How to configure a remote database server with Plesk

How to configure a remote database server with Plesk

Published on: 15 December 2021

Database Hosting Plesk

Introduction

Plesk uses database servers to store its databases or those used by its components.

Plesk supports various DBMS (Database Management System), both for Linux and Windows, and some of them are already installed by default. Moreover, Plesk can be configured with database servers on the same server or on a remote server.

In this tutorial, after describing the different types of database servers available, the procedure for the correct configuration of an external database within your Plesk panel will be explained.

Installing the database server engine

Before adding an external database server, it is necessary to install the engine supported by the database server you will be using, if not already installed with Plesk.

To do so, log in to the Plesk Control Panel and open the ‘Tools & Settings’ tab under the ‘Server ‘Management’ menu.

Then, go to ‘Updates’ under the ‘Plesk’ heading, click on the ‘Add Components’ button and choose the type of engine to add.

Linux

Plesk for Linux provides support for MySQL and PostgreSQL database servers. 

MySQL is already installed during the Plesk installation, therefore, in this case, there is no need to add the component.

To install PostgreSQL search for the PostgreSQL Server component in the path ’Tools and settings > Updates > Add components’, instead.

Microsoft

Plesk for Windows supports MariaDB, MySQL and Microsoft SQL. MariaDB is installed and used as the Plesk database by default.

Plesk also offers several versions of Microsoft SQL Server. To integrate them, search for the component indicated in the path ’Tools and settings > Updates > Add components’.

Keep in mind that, in order to use Microsoft SQL Server with Plesk, obtaining first the Plesk Power Pack add-on module is necessary. On Aruba Cloud , this module can be purchased at a good price when getting your Plesk license, by going to the ‘Plesk Licenses’ section within your server's control panel.

Adding external database servers

To add an external database server open the ‘Tools & Settings’ tab.

Then select ‘Database Servers’ under ‘Applications & Databases’ and click on the ‘Add Database Server’ button:

database-server.png

Then specify some properties of the database server:
  • Indicate the type of engine supported by your database server;
  • Specify the hostname or IP address of the server;
  • Specify the port number the database server will listen on. This option is only available for MySQL. By default, MySQL servers listen on port 3306. The Port number box can be left blank if your MySQL database server listens on the default port;
  • Specify which database is running on the server;
  • Choose to set the listed server as the default for MySQL or MS SQL;
  • Enter your database server credentials.

new-database-server.png

Confirm the server configuration by clicking on ‘OK’ to end the procedure.

N.B. Network access to the database server must be enabled in order to correctly add a remote database.

If a SQL Server is entered, provide a backup configuration. Read more about the topic in our guide dedicated to How to configure backups with Plesk.

Removing database server from Plesk

If there are no databases in it and if not set as the default database on Plesk, a database server can be removed.

If the server you are trying to delete contains databases or is set as default, the procedure will include some preliminary guidelines to follow before resorting to the actual database server removal process. These indications will be explained in the following sections.

Deleting databases from the database server

If there is no database on your server, skip this part

To proceed with the removal procedure, first, delete any databases on the affected server. This is a very simple procedure:

  • Look for the Database Server entry in Tools and Settings
  • Click on the host name of the server you wish to remove
  • In the upper left corner, tick a checkbox to select all the databases present within the chosen server
  • Click on Remove and confirm the procedure

Changing the default database server

If your server is not set as default, skip this part

Once all databases on the server have been deleted, the only necessary step to delete a database is making another database server default to free it :

  • Click on the Server Database link in the address bar
  • Click on the host name of the database server to be set as the new default server. Note that the database type of the new server should be, for compatibility, the same as the one deleted.
  • Click on the Preferences item and check the option to make it the default server for MySQL or MS SQL.

Once the preliminary procedures have been completed, move on to the actual removal of the database server.

Final removal procedure

To remove a database server, follow these steps:

  • Access the Database Server section in Tools and Settings.
  • Select, using the controls, the database server to be removed
  • Click on Remove and confirm the operation

Conclusions

At the end of this guide you should be able to distinguish various types of database servers available on Plesk, integrate the external ones into your Plesk, and manage the removal of servers that you no longer need.