How to export MySQL table as CSV

Exporting data from MySQL to CSV is a common need and is often needed to either reimport the data or process it externally using programatically. Let’s see how to export contents of a table in CSV format

Option 1: Using PHPMyAdmin

If you have phpmyadmin installed you can use the export feature available and us the csv format

Option 2: From command line

Here is the syntax to export table

limit is optional, you can remove if you don’t want to specify the number of records

Leave a Reply

Your email address will not be published. Required fields are marked *