We generally support external access to databases. Depending on the administration interface, the method for enabling external access and where to find the connection data for this access varies.
Table of contents
1. I manage my webhosting with the CloudPit
1.1 Allow external database access
1.2 Connecting to the database from outside
2. I manage my web hosting in Control Panel
1. I manage my webhosting with the 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 must now click on the [ACTIONS] button and then select the [Edit User] subpoint.
1.1 Allow external database access
In the editing mask, you can now allow external access to the database for the selected user. You can do this either by selecting the [Allow External Access] option or by selecting the [Allow Custom Connections] option. The latter allows you to specify specific IP addresses, such as 127.0.0.1 (for accessing the database from a web application) and your own private IP address, separated by commas, which will only allow you to access the database from outside.
To save the changed access settings, you must also enter the current password. If you change the password at this step, you must also update it in the associated application, as it will otherwise not be able to establish a database connection.
Don't forget to save the setting you made afterwards.
1.2 Connecting to the database from outside
When accessing the database from outside, you must use the domain name, hostname, or IP address of the web server where your database is hosted as the server name. The username and password remain unchanged.
The port numbers for MySQL are as follows:
- for MySQL 5.7: 3306
- for MySQL 8+ databases: 3307
2. I manage my web hosting in Control Panel
By default, you can always access the database from outside using your database user - you only need to obtain the correct connection data, which you can find on the datasheet in your Control Panel.
To access the data sheet, click on [Web Hosting] --> [Datasheet]. Here, you will find the hostname for the external database connection for both MySQL and PostgreSQL. Note that you must also specify the correct port for the connection to be established.
The port numbers are as follows:
- MySQL 5: 3306
- MySQL 8: 3307
- PostgreSQL: 5432
Note that the hostname is always specific to your web hosting.