First of all, thanks to the developer of MySQL who created mysqldump tools. By using this tool, you may be able to export data from MySQL databases to CSV files and deliminated text files. Here is the syntax:
mysqldump -u[username] -p[password] -t -T/path/to/directory [database] --fields-terminated-by=,
A destination path in the command above should be writeable for user mysql. You can use "--fields-terminated-by=" to change deliminated flag like comma, tab, etc. Consider that you have a database with its table like this:
mysql> use trial;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from moneter;
+----+--------+---------+
| id | mphone | dshell |
+----+--------+---------+
| 1 | BBBOH | P808091 |
| 2 | BBBIJ | P909091 |
| 3 | AABCO | P606052 |
| 4 | ABBCO | P608752 |
| 5 | AGHCO | P788752 |
| 6 | GGOUG | P102220 |
| 7 | GGOJG | P102343 |
+----+--------+---------+
7 rows in set (0.00 sec)
