Manage MySQL Database on Linux Hosting
This guide covers the essential MySQL database tasks in your Linux hosting account, including creating a database, accessing it through phpMyAdmin, importing or exporting backups, and checking and repairing a database.
MySQL databases store and manage the data that websites and applications, such as WordPress, need to run properly. By the end of this guide, you'll know how to create, access, back up, restore, and maintain a MySQL database with confidence.
On this page
- When to create a database manually
- How to create a MySQL database
- How to access a database using phpMyAdmin
- How to import a database backup
- How to export a database backup
- How to check and repair a database
When to create a database manually
Many applications, such as WordPress and Joomla, automatically create and configure a database during installation. However, there are situations where you'll need to create and manage a database yourself.
You may need to create a database manually when:
- The application or website does not provide an automatic database setup process during installation (for example, a manual WordPress installation).
- A website requires an existing database to be imported, restored, or rebuilt from a backup, such as during a website migration.
How to create a MySQL database
Our Linux Hosting plans allow you to manually create a MySQL database using either the Linux Control Panel or cPanel. Classic hosting plans support database creation through cPanel only.
How to access a database using phpMyAdmin
phpMyAdmin is a web-based database management tool that lets you view, edit, and manage your database content.
How to import a database backup
Importing a database allows you to restore data from a backup or move a database from one environment to another. Before proceeding, ensure you have a valid database backup file.
- Go to your phpMyAdmin.
- On the left pane, click on the empty database where you want to import the backup file.
- Click the Import tab at the top of the page.
- Click Choose File and select the database backup file on your computer.
- Once done, scroll down and click Import.
Once the import is complete, your database will be available for your website or application to use.
How to export a database backup
Exporting a database creates a backup file that you can save locally for safekeeping or migration purposes.
- In your phpMyAdmin, click on the database that you want to export.
- Click the Export tab.
- Leave the export format set to SQL.
- Click Export.
The database backup file will be downloaded to your computer.
How to check and repair a database
Database corruption can occur due to incomplete updates, server interruptions, or other unexpected issues. Checking and repairing your database can help identify and resolve database table errors that may affect your website's functionality.
All set!
You now know how to create, access, back up, restore, and maintain MySQL databases in your Linux hosting account. With these tools, you can manage your website's data, recover from issues, and keep your databases running smoothly.
If you need to perform additional database management tasks, you can continue using phpMyAdmin and your hosting control panel.