Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Python
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
mysqltocsv.py

README

 mysqltocsv.py connect to a MySQL Server, send a query, 
  and, with the result set, make CSV to the standard output.

 mysqltocsv.py is written in Python, need the MySQLdb extension,
  and use the Python internal CSV module.

 Options are : 

--host=host_name, -h host_name : MySQL Hostname
--port=port_num, -P port_num : MySQL Port 
--user=user_name, -u user_name : MySQL Username 
--password[=password], -p[password] : MySQL Password 
--database=db_name, -D db_name : MySQL Database 

--execute=statement, -e statement : MySQL SELECT Query 

--fields-enclosed-by : CSV Enclosed Character
--fields-escaped-by : CSV Escaped Character
--fields-optionally-enclosed-by=string
--fields-terminated-by : CSV Field Terminated by 
--lines-terminated-by : CSV Lines Terminated by
Something went wrong with that request. Please try again.