Question Locked

How to Export MySQL data to CSV?

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm running a windows machine (IIS6), with MySQL Server and MySQL Administrator installed.

Unfortunately, phpmyadmin isn't installed.

I need to export a MySQL database into .csv format. Does anyone know what the easiest way to do this is?

3 replies

by menzo

phpmyadmin is THE solution for you.

Easy to install and free to download ;)

http://www.phpmyadmin.net/home_page/index.php

You can also try this command line:

mysql -uexampleuser -pletmein exampledb -B -e "select * from \`person\`;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > filename.csv

This discussion is closed to new replies.