Sometimes it is very handy to be able to export a CSV (Comma Separated Value) from your database. Perhaps you want to use your spread sheet program to quickly alter some of the fields or you want to quickly add new rows (e.g. products) without having to go through your administration interface. Here is an easy set of instructions to help you on your way.
The first thing you will see is a login screen like this:
Your hosting company will provide you with a user name and password.
Choose your Database
Choose your table
You now see a list of all of the tables within that database in the left column. You need to scan down and find the table that you want to export. In this example I have selected the list of products from a ZenCart e-commerce site.
The export menu
Choose the correct options
Depending on what version of phpMyAdmin you are using, you will now either see this screen:Or this:In either case you will need to check the items that I circled. In the first example you can select CSV as your file format, choose to have the field names in the first row (this helps if you will need to know what column you are editing, but may cause issues when you import it back into your database), Choose if you are dumping all rows or just part of the table, and how you will be compressing the file before downloading.
In the second example, the same options exist, just in a different order:
- Choose custom – display all possible options
- Dump all rows?
- How will you compress the file?
- CSV file format?
- Put the column names in the first row?
Once you click “Go” you will be asked where to download the file to.
You now have a CSV file that you can work with. Importing is a very similar process. Be sure you make a back-up of your database before you make any changes. This will prevent a lot of frustration if something goes wrong.
Thanks for reading. If you have questions or have found this short tutorial useful, please add comments below.