In this article you will learn how to create and manage a database on a web hosting package at TransIP.
A database is a place where you can store, retrieve and configure the data of your website. Databases are created via your TransIP control panel and managed via PHPMyAdmin.
Creating and managing a database
Inside your control panel, go to the 'Domains & Hosting' tab and select your domain name on the left hand side (don't check the box). Next to 'your website', click on the cog wheel, followed by 'Database'.
Now, click on '+ Create database'.
Choose a name for your database and allocate space to it. We recommend using at least 100 MB. Click on 'Create database'.
As soon as you have created your database, we will send you an email with the subject 'Your database for your domain has been created'. This email contains the login credentials for your database.
After a few moments your database will become active. You can find your database by going to 'Manage your website' again and clicking on 'Database'. Refresh the page until the database is visible.
Now, click on the link below 'User' to arrive at the login page of phpMyAdmin. You will only need to enter the password of the database here, which you have received by email.
The password of your database
In case you've lost the password of your database, we recommend opening the configuration file of your website as the database password is stored there in most cases. The configuration file of your website is usually a config.php or wp-config.php file (for WordPress) and is stored in the www folder of your website. This file contains the login details that your website is currently using to connect to the database.
You can use 'SFTP filemanagement' to navigate to the 'www' folder, in which you will find the (wp-)config.php file.
Open the configuration file file and navigate to the following line:
/** MySQL database password */ define('DB_PASSWORD', 'passwordexample');
This password (in our example passwordexample, we recommend using a stronger password) is used to log in to the database, as stated in Step 4.
If you wish to change the password of your database, keep in mind that this password will have to be changed in the configuration file of your website as well.
To change the password of your database, visit your control panel, go to 'Manage your website' and click on 'Database'. Click the link below 'Database name' to set a new password for your database.
As mentioned before, the changed password has to be changed in the configuration file of your website as well. If you do not change it in this file, your website will not be able to connect to the database, resulting in your website becoming temporarily unavailable.
In order to change the password in the configuration file of your website, download the file using SFTP filemanagement in your control panel.
Open the www folder and search for the configuration file (config.php or wp-config.php). Select the file by checking the box next to it and click on 'Download'.
Now open the file with a simple text editor such as 'Notepad++' and look for the old password (see the code block above).
Take note: do not use an advanced text editor such as Word, as these editors add hidden markup rendering the file unusable.
Now replace the old password with the new password and save the configuration file. Next, upload the updated configuration file to the same location it was previously in (usually the www folder of your website).
- If you have an active WordPress website, we recommend not changing the password of your database. In stead, look up the current password in the wp-config.php file and use that password.
- You can only manage your MySQL database with phpMyAdmin. Third party are excluded due to security reasons.
- If you use a different type of website, you may have to provide the database with content yourself. In case you wish to tinker with your database, we recommend doing research on editing databases, as the smallest adjustments to a database can have major consequences.
In this article we explained how to create and manage a database on your web hosting package.
Should you have any questions left regarding this article, do not hesitate to contact our support department. You can reach them via the 'Contact us' button at the bottom of this page and via the 'Contact' button inside your control panel.
If you wish to discuss this article with other users, feel free to leave a comment below.