Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 427 Bytes

export-mysql-query.md

File metadata and controls

25 lines (14 loc) · 427 Bytes

Usage: export-mysql-query file

Description:

  Query a MySQL database and stream results to stdout in csv format.
  Normalizes date fields as GMT strings.

Enviornment Variables:

  MYSQL_URL

Dependencies:

  This script is rarely used so mysql dependency is handled manually:

    npm install mysql
 
Examples:

  MYSQL_URL=mysql://root@localhost:3306/mydb ./export-mysql-query query.sql \
    > data/families.csv