-
Notifications
You must be signed in to change notification settings - Fork 23
read_mysql
Martin Asser Hansen edited this page Oct 2, 2015
·
6 revisions
read_mysql can submit a query to a MySQL database and the results will be converted to Biopiece records where the table column name is used as record key and each table row is converted to one Biopiece record.
See how to setup default MySQL username and password here: http://code.google.com/p/biopieces/wiki/HowTo#Howto_setup_default_MySQL_username_and_password
For more about MySQL: http://www.mysql.com/
read_mysql [options] <-d <database>> <-q <query>>
[-? | --help] # Print full usage description.
[-d <string> | --database=<string>] # MySQL database.
[-q <string> | --query=<string>] # MySQL query.
[-u <string> | --user=<string>] # MySQL user name - Default=<from ~/.biopiecesrc>
[-p <string> | --password=<string>] # MySQL password - Default=<from ~/.biopiecesrc>
[-I <file!> | --stream_in=<file!>] # Read input stream from file - Default=STDIN
[-O <file> | --stream_out=<file>] # Write output stream to file - Default=STDOUT
[-v | --verbose] # Verbose output.
read_mysql -d dm3 -q 'SHOW TABLES' # Retreive table information from database.
read_mysql -d dm3 -q 'SELECT * FROM estOrientInfo' # Retreive entire estOreintInfo.
read_mysql -d dm3 -q 'SELECT * FROM table WHERE Score < 100' # Retreive selected lines from table.
Martin Asser Hansen - Copyright (C) - All rights reserved.
August 2007
GNU General Public License version 2
http://www.gnu.org/copyleft/gpl.html
read_mysql is part of the Biopieces framework.