Using phpMyAdmin for SQL Dumps & Backups
- Posted by admin
- 22 June 2009
- Web Hosting Tutorials, Webmasters, Zen Cart Tutorials
This tutorial will teach you how to use phpMyAdmin to create SQL dumps and backups of your databases.
1.
Login in to your hosting control panel and locate the phpMyAdmin icon within the cPanel. (It will generally open a new window, so your pop up blocker may grab it. Use the control button when clicking to allow the pop up.
2. Select the correct database using the left hand menu and click the link of the database you wish to dump or backup.
3. Along the top of the right hand side you will see tabbed menu selections like below, you will choose export.
![]()
4. Once in the export screen you have many selections, we will address each one below.
- On the left side of the export screen you can select individual tables or all to export.
- Also on the left side you have options for the export format, in this case it will be SQL and is likely checked by default for you.
- On the right of the export screen under options you will first see custom commenting, Enclose export in a transaction and Disable foreign key checks. We will not be using these and they should remain blank.
- The next box down is structure, in this box you will check the following options:
- Add DROP TABLE / VIEW / PROCEDURE / FUNCTION
- Add IF NOT EXISTS
- Add AUTO_INCREMENT value
- Enclose table and field names with backquotes
- We will not be checking the option Creation/Update/Check dates, under Add into comments.
- In the last right hand box labeled data we will be checking the following options only:
- Complete inserts
- Extended inserts
- Maximal length of created query field should be 50000
- Use hexadecimal for BLOB
- Lastly, the Export type dropdown will be set to Insert.
- The large field below labeled Save as file will be checked to export this as a file and not in your broswer window. Compressions is only necessary for very large databases.
- All of this completed, just click the go button and your dump/backup will begin assembling for you.
- After its done you will have the opportunity to save the file. Please safe this to a secure location and NEVER place SQL files in your website file directories, as they are very vulnerable.
To use this for backing up when you haven't another utility to backup your databse is a great idea. If you should need to restore you backup simply load the database as described above and select the import tab instead of export, browse to your SQL dump file and hit GO.

