OPENMYSQL
Name
openmysql
Purpose
Open a mySQL database for operations via a pipe.
Description
Category
Database
Calling Sequence
openmysql,lun,dbname
Inputs
dbname - Name of database to open at start.
Optional Input Parameters
Keyword Input Parameters
HOST - host name of the server to connect to for queries. The default
is to use the host name specified in your .my.conf configuration
file.
USER - user name to be used for the connection. This is the user name
as understood by mysql and has no relationship to the user name
of the calling process. The default is to use the user name
specified in your .my.conf configuration file.
SOCKET - String, identifies socket for client to read and write from.
default is to not use a socket.
Outputs
lun - the logical unit of the pipe (use free_lun to close).
error - return value indicating if the open call succeeded. If error is
zero, the open was good and the lun is ready for use. If error
is not zero, the lun will not point to an open file and the
!error_state system variable will contain more information if
you want it.
Keyword Output Parameters
Common Blocks
Side Effects
Restrictions
Assumes that your .my.cnf file points to the correct mysql server and that
it includes the login information. Also, the command 'mysql' must appear
in your default path.
Procedure
Modification History
Written by Marc W. Buie, Lowell Observatory, 2002/01/09
2006/12/08, MWB, added error output argument, now can indicate if open failed
2007/09/06, MWB, added HOST/USER keywords
2010/03/05, MWB, added the EXTRACONFIG keyword
2011/11/23, Jarle Brinchmann, Leiden Univ., Add SOCKET keyword
to support reading from sockets