slardiere / mysqltocsv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

 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

About


Languages

Language:Python 100.0%