|
There are three main ways to back up or restore a MySQL database on our servers: via cPanel Backup, SSH or the phpMyAdmin interface.
If you need SSH Telnet access, just send us a ticket with your request for it to be enabled. To access the phpMyAdmin interface, click on the "phpMyAdmin" on your control panel.
How create a backup of a MySQL database using cPanel Backup:
-
Log into cPanel:
- Click on the Backups icon
- Select the MySql Db that you want to back up and download a zipped copy
How create a backup of a MySQL database using SSH:
-
Log into your account on our server and issue the following command:
- /usr/bin/mysqldump databasename -u user -p password > /home/user/file.sql
- Enter your actual username and password where we have indicated user and password. This will create a file called "file.sql" that contains your entire database.
How to restore a database using SSH :
-
Log into your account on our server and issue the following command:
- mysql databasename -u user -ppassword < /home/user/file.dump
How to create a backup MySQL database using phpMyAdmin:
- Open phpMyAdmin.
-
Click on your database name shown on the upper left.
- Click Export in the Menu to get to where you can backup you MySql database. Image showing the export menu.
- Make sure that you have selected to export your entire database, and not just one table. There should be as many tables in the export list as showing under the database name.
- Select"SQL"-> for output format, Check "Structure" and "Add AUTO_INCREMENT" value. Check "Enclose table and field name with backquotes". Check "DATA", check use "hexadecimal for binary field". Export type set to "INSERT".
- Check "Save as file", do not change the file name, use compression if you want. Then click "GO" to download the backup file.
How to restore a MySQL database using phpMyAdmin:
- To restore a database, you click the SQL tab.
- On the "SQL"-page , unclick the show query here again.
- Browse to your backup of the database.
- Click Go.
phpMyAdmin has some file size limits so if you have large databases it may no be possible to backup using phpMyAdmin. |