General information
The following parameters are required to access the database:
- the database user
- the database name
- the database server (host)
- the server port (default: 3306)
- the password for the database
In our Classic Hosting, the database name and the database user are identical and have the format db123456_789. With our Cloud Hosting, the customer can determine the database name and the database user themselves, apart from a prefix specified by us.
The size of the database is not limited by the size of the hosting package. However, care should be taken to ensure that the databases are not too large, as otherwise the performance of the website will suffer and a backup/restore can take a very long time. In addition, a backup on the web space can cause it to fill up and impair the function of the website.
As our database servers (MySQL, MariaDB) run on the same server as the web server (Apache), no data has to be transferred via the server network, which results in faster delivery of the database content.
Database server
The following database servers are available for our cloud hosting:
- db.mariadb1011 (MariaDB 10.11)
- db.mariadb103 (MariaDB 10.3)
- db.mysql56 (MySQl 5.6)
The following database servers are available for our Classical Hosting:
- mariadb106 (MariaDB 10.6)
- localhost (MariaDB 10.4)
- mysql (MySQl 5.7)
Export and import of databases
In principle, you can also export/import databases via PhpMyAdmin, but especially with larger databases you will quickly reach the limits (PHP script runtime or memory limit).
Log in to the shell with your SSH user. On Windows you can use the free Putty program for this, on MacOS/Linux you can do this directly in the shell. You can find your SSH access data in your customer menu [Configuration ' SSH access (shell)].
Export database to file
The safest way to export a database is directly on the shell with the command mysqldump.
An export of the database is created with the following command:
mysqldump --opt --no-tablespaces -u db159422_875 -p -h mariadb106 db159422_875 > db159422_875.sql
The -h parameter specifies the database server.
In this command, replace db159422_875 with the name of your database. After pressing the Enter key, the password for the database is requested. All this data can be found in your customer menu, the password for the database can also be found in the configuration of your website.
Import database from file
The safest way to import a database is directly on the shell using the mysql command.
A database is imported using the command:
mysql -u db12345_678 -p -h mariadb106 db12345_678 < filename.sql
The -h parameter specifies the database server.
In this example, the file "filename.sql", which was previously created with mysqldump, is used as the "input source".
In this command, replace db12345_678 with the name of your database. After pressing the Enter key, the password for the database is requested. All this data can be found in your customer menu, the password for the database can also be found in the configuration of your website.
External access to databases
IMPORTANT: For security reasons, access from external systems to the databases is only possible via an SSH tunnel.
In the following examples, we use a domain name as the host name. If you have problems establishing a connection, use the IP address of the server.
You can view the IP address in your customer menu [SSH access (shell) ' Gears ' Open].
1. set up a normal SSH connection (with PuTTY)(supplementary video instructions)
Direct access to a database with "MySQL Workbench"
It is also possible to access the databases directly with external programs via SSH tunnel. Possible programs are, for example, "MySQL Workbench" (Windows, MacOS, Linux) or "Sequel Pro" (MacOS).
For the following example, we use the Windows version of "MySQL Workbench".
2. enter any name under "Connection Name".
For "Connection Method", select "Standard TCP/IP over SSH".
You can use the domain name as the "SSH host name", alternatively use the IP address of the server.
You can find the "SSH Username" in your customer menu in the "SSH Access (Shell)" area. If you no longer know the password, you will need to assign a new one there.
Click on "Store in Vault" under "SSH Password" and then enter the SSH password.
Enter the database server (see above) for "MySQL Hostname". The "MySQL Server Port" is 3306.
For the username, enter the database user name that you can find in your customer menu.
Enter the password for the database by clicking on "Store in Vault".
If you no longer know the database password, you may be able to find it in the LocalConfiguration.php of the TYPO3 installation (or a configuration file of another system if you are not working with TYPO3).
If you do not know the database password, you would have to assign a new one in your customer menu and then adjust it in the configuration file.
To check whether the connection can be established, you can click on "Test Connection". If everything is OK, then click on "OK".
For information on the use and operation of "MySQL Workbench", please refer to the program documentation.
This page contains automatically translated content.