Backup of Mysql database using PhpMyAdmin

holhostcom

New member
Backup of Mysql database
It is assumed that you have phpMyAdmin installed since a lot of web service providers use it.

0. Open phpMyAdmin.
1. Click Export in the Menu to get to where you can backup you MySql database. Image showing the export menu.
2. 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.
3. 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".
4. Check "Save as file", do not change the file name, use compression if you want. Then click "GO" to download the backup file.

Restoring a backup of a MySql database
1. To restore a database, you click the SQL tab.
2. On the "SQL"-page , unclick the show query here again.
3. Browse to your backup of the database.
4. Click Go.
 
Thanks for the info, I would also like to add that while this may work for some it may not work for all databases as bigger databases may be too big and timeout.

If you have SSH access, then you can do a mysqldump which is a safer bet. You can also ask your web host to do this for you if you do not have access generally or are not comfortable with doing this.

mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]

# [username] - this is your database username
# [password] - this is the password for your database
# [databasename] - the name of your database
# [backupfile.sql] - the file to which the backup should be written.
 
Just a reminder, you can also easily backup Mysql databases in cPanel (for those who use it) :)

You are right. But I assume they are the tips for the non Cpanel accounts or to be nore exact for non Cpanel backups.

Nice tips. They are obvious fo me but I assume someone will find them interesting
 
Back
Top