How can I access my database externally?

In principle, we support external access to databases. Depending on the management interface, the way you enable external access or where you find the connection data for this access may vary.

Table of Contents

1. I manage my web hosting in CloudPit

1.1 Allow external access to a database

1.2 What is the server name for external access?

2. I manage my web hosting in the Control Panel

1. I manage my web hosting in CloudPit

By default, external database access is disabled in CloudPit and must be manually enabled for each database user.

To do this, navigate to the [DATABASES] menu in the web hosting management menu and click on the [Manage database users] button.

In the database user menu, you now need to click the [ACTIONS] button and then the [Edit user] submenu.

1.1 Allow external access to a database

In the edit screen, you can now allow external access to the database for the selected user. Either with the option [allow external access] or with the option [Allow custom connections]. With the latter, you can also specify certain IPs—such as 127.0.0.1 (for a web application's access to the database) and your own private IP—separated by commas, so that only you can access the database externally.

To save the changed access control, you must also enter the current password. If you change the password in this step, you must also update it in the corresponding application, otherwise it will not be able to establish a database connection.

Don't forget to save the setting you made here afterwards.

1.2 What is the server name for external access?

When accessing the database externally, you must use your domain name, the hostname, or the IP of the web server where your database is hosted as the server name. The username and password remain unchanged.

The port for MySQL 5.7 is 3306, and for MySQL 8+ databases it is 3307.

2. I manage my web hosting in the Control Panel

By default, you can always access the database externally with your database user—you only need the correct connection data, which you can find on the data sheet in your Control Panel.

To access the data sheet, click on [Webhosting] --> [Data sheet]. Here you will find the hostname for the external database connection for both MySQL and PostgreSQL. Note that you must specify the correct port for the connection.

These are as follows:

  • MySQL 5: 3306
  • MySQL 8: 3307
  • PostgreSQL: 5432

Please note that the hostname is always specific to your web hosting.