Many websites and applications store their data in a MySQL database: think of WordPress, a web shop or your own application. In the hosting control panel you can create a database yourself, together with a user that has access to it. This article explains how.
Installing WordPress through the control panel? Then you don’t need to do anything: the installer creates the database for you automatically. See Installing WordPress in the Enhance control panel.
What do you need?
- A website that has already been created in the control panel.
- Your login details for the control panel. Not sure where to log in? Read Where can I find the hosting control panel?
Step 1: Log in and choose your website
- Go to https://cp.vcloudhosting.eu and log in.
- Click Websites on the left and choose the website you want to create a database for.
- Open the Databases section. If you don’t see it straight away, look in the Advanced drop-down menu.
You now see the MySQL databases page, with an overview of this website’s existing databases and users.
Step 2: Create a database user
A website or application logs in to the database with a database user. Create the user first, so you can link it straight away when you create the database.
- Click Add user.
- Enter a username and a strong password. Store the password somewhere safe straight away, you will need it later.
- Already have databases? Under Database access, tick the databases this user may access.
- Click Add. The new user now appears on the Users tab.
Step 3: Create the database
- Click Add database.
- Enter a name for the database, for example
webshop. - Choose the user(s) who get access to this database.
- Leave All database privileges ticked if the user may do everything in the database. Most websites and applications need this. To limit the rights, untick it and choose the rights yourself.
- Click Add. The database now appears on the Databases tab.
Step 4: Use the details in your website
The control panel automatically puts your account name in front of the database name and the user name. If you type webshop, for example, the full database name will be something like youraccount_webshop. Always use that full name, exactly as it appears in the overview.
In your website’s or application’s settings, enter:
- Database server (host):
localhost - Database name: the full database name, including the prefix
- Username: the full database user name, including the prefix
- Password: the password you chose in step 2
In WordPress, these details are stored in the wp-config.php file.
Viewing the database with phpMyAdmin
phpMyAdmin lets you view and manage the contents of your database in your browser. You can also import or export a backup of your database there.
- On the Databases tab, click the database.
- Click phpMyAdmin. You are signed in automatically.
- To import a database: click the Import tab, choose your
.sqlfile and click Go. - To export a database: click the Export tab, choose the SQL format and click Go.
Changing or deleting a user or database
- Adding or removing users for a database: on the Databases tab, click the database and adjust its users.
- Changing a password or deleting a user: on the Users tab, click the user. If you change the password, update it in your website’s settings too, or the website can no longer connect to the database.
- Deleting a database: on the Databases tab, click the database and choose Delete. Note: all data in that database will be gone. Make an export first if in doubt.
Connecting from outside
By default, only your website itself can connect to the database. That is the safest setup. Want to connect from your own computer or another server, for example with a database program? Contact us first, and we will work out the safest approach together.
Need help?
Stuck, or want to move an existing database to your hosting at Kyzoe? Email support@kyzoe.be. We are happy to help.