Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Script to export query results into local CSV files

Project Description

Export MySQL query results to local CSV file.


$ mycsv [-u username] [-p password] [-h hostname] [-p port] [-s query.sql] [-O output.csv]

If you omit password option you will got a prompt asking for the password (password will not be echoed):

$ mycsv -O report.csv < report.sql
Password []:

You can send SQL script using stdin and dump CSV results to stdout:

$ mycsv -p Sekr3T < report.sql > report.csv

Release History

This version
History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(2.4 kB) Copy SHA256 Hash SHA256
Source None Oct 3, 2014

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate