This article deals with the basic functioning of databases on the Webhosting service. For more information on database versions, go to the Webhosting – Database Version article. If you need to export or import data, follow the instructions Webhosting – Export/Import Database in phpMyAdmin.
In this article, you will learn:
- What are the database parameters
- How to create a database
- How database users work
- How to manage a database
- Common issues
- Frequently asked questions
Database Parameters
Each Webhosting can have any number of MySQL (for older services) or MariaDB databases. You can find more information about the database versions in the article Webhosting – Database Version.
The basic parameters of databases on Webhosting are:
- Total space for databases 1 GB with Webhosting LowCost, 2 GB with NoLimit, and 5 GB for Extra)
- Creating and deleting via the customer administration panel
- Management through phpMyAdmin
You can find a more detailed overview of the database parameters on the Webhosting plan product pages.
Create New Database
Follow the instructions below to create a new database:
- Log into the customer administration panel.
- In the navigation bar, select Web & Email Hosting Webhosting or WMS.
- Open the service detail.
- In the left menu, click the New Database link.
- Name the database (max. 7 characters without diacritics), choose or enter an email for the password recipient and click the Create button.
Alternatively, you can create a database directly in the Webhosting detail by clicking the Create New link in the Databases table.
After the database is created, the system will send the login data to the email entered during setup.
Database User Accounts
You can only access databases from the phpMyAdmin web interface and from WEDOS Webhosting servers. The databases are not accessible from the outside or from other servers, and we do not allow this access in any way.
After creating a new MySQL database, you will receive two sets of login information:
- The admin user (the login name starts with the letter a) has full database permissions. Use this account to manage databases via the phpMyAdmin interface – do not connect to it from PHP unless necessary.
- The web user (the login name starts with the letter w) has limited permissions: they can work with the data, but cannot change the structure of the tables. Connect this user to the database from PHP.
Each database has these 2 users. For security reasons, you cannot change their permissions or add new ones.
What are the specific database user permissions?
The admin user has the following permissions:
- Select
- Insert
- Update
- Delete
- Create
- Drop
- Index
- Alter
- Create_tmp_table
- Lock_tables
- Create_view
- Show_view
- Create_routine
- Alter_routine
- Execute
- Trigger
- Select
- Insert
- Update
- Delete
- Create_tmp_table
- Lock_tables
- Execute
When entering the database login information in your PHP application, pay special attention to the following 4 entries (you can find them in the database creation email notification, or in the database detail in the customer administration panel):
- Database Server Name – either wmX.wedos.net or mdX.wedos.net, where X is a number
- Database Name
- Login Name
- Password (avoid whitespace)
Database Management
Changes entered in the customer administration panel will take effect within 30 minutes.
Follow these steps to manage the database in the customer administration panel:
- Log into the customer administration panel.
- In the navigation bar, select Web & Email Hosting Webhosting or WMS.
- Open the service detail.
- Find the specific database in the service detail and click the magnifying glass icon to open its detail.
In the customer administration panel, you can:
Change Database User Password
If you change the password of the user which your application uses to log into the database, update your PHP code accordingly!
You can change the password for each database user account. In the Change Admin Password or Change Web Password table, enter the new password twice and save it.
Delete Database
Before deleting the database, we recommend backing up the data by exporting them according to this guide. Deleting the database completely and irretrievably removes it from the system, including all the data it contains.
To delete the database, enter the word DELETE in capital letters in the deletion confirmation box and confirm with the Delete Database button.
Once deleted, you cannot create a database with the same name.
You can restore the data itself from your own or our backup by importing it into a new database. Afterward, you can connect the new database to the web application by modifying the app’s configuration file.
Advanced Database Management
Perform the rest of the database management via the phpMyAdmin web interface. Here you can:
- Add, remove, or modify tables
- Import and export databases
Common Issues
Common problems with databases include:
- Incorrect database version
- Unavailable database from the Internet
- Isufficient web user permissions
- Web stopped working after database update
- Deleted database
Incorrect Database Version
Issue: My application requires a different type or version of the database.
Solution: You can change the database version according to the guide Webhosting – Database Version.
Webhosting only supports MariaDB databases. You can only run other database system on your own server.
Database Unavailable
Issue: I cannot login to the database from another provider’s application or from my computer.
Cause: For security reasons, access to Webhosting databases is limited to WEDOS Webhosting and WMS services only. We do not provide exceptions to this rule.
Solution: To manage databases, use a Webhosting application (e.g. on a subdomain) or the phpMyAdmin interface.
Insufficient Web User Permissions
Issue: The application does not work properly if I log into the database as the web user.
Cause: The application needs to use the commands available only to the administrator account, such as creating tables when installing a content management system.
Solution: Enter administrator account credentials as necessary.
Web Doesn’t Work after Database Update
Issue: After editing the database, the website stopped working.
Cause: The most common source of problems is changing the password in the administration panel, but not in the website configuration file. Another cause of errors can be damage or deletion of a part of the database necessary for the website’s proper operation.
Solution: If you just changed the database password, update it in your application’s configuration file. Consult your application’s manual on how to update it. If you changed the database contents and the website stopped working, import a backup.
Deleted Database
Issue: We accidentally deleted the database.
Solution: There are two sorts of deleted databases:
- Restore deleted data from backup.
- You cannot restore a deleted database (according to the Delete Database chapter) as such. Create a new database (with a new name) and restore data from a backup. Next, update the access data in your application’s configuration file according to that application’s manual.
FAQ
Question: Where exactly do I set the new database access data in PHP?
Answer: It depends on your specific application. Consult that application’s manual, support, or ask your webmaster.
Question: What is the difference between MySQL and MariaDB?
Answer: MariaDB is an offshoot of MySQL. They are mostly compatible with each other and most CMS are fully functional with MariaDB. If you strictly require MySQL, install it on a VPS server.
Question: How do I find out my database credentials without a service setup email?
Answer: You can find them from the configuration file of your PHP application that uses the database. If this is not possible, you will need to change the database password. Next to the password change form, you will also find a table with an overview of access to the database.