| Export mysql to csv |
|
If you want to export a mysql database to a comma seperated file, mysql -umysqlusername -pmysqlpass databsename -B -e "select * from \`tabalename\`;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > mysql_exported_table.csv |
Forefront IT Services
The Old Haybarn
Rosebery Mews
Mentmore
Leighton Buzzard
Bedfordshire
LU7 0UE
Tel: 0845 686 3348
Email: info@ffits.co.uk