A database interface to MySQL open source database.
This interface supports MySQL version 5.0 and above. The database can be downloaded from www.mysql.org.
A MySQL connect string, typically specified via a command line option, takes the following form:
-c=<connectString>
where <connectString> contains the MySQL connection parameters. e.g.
-c="user=fred,pwd=itsasecret,host=dbsvr1,database=stores"
Key |
Mandatory |
Description |
user | yes | The user's MySQL login ID. |
password | yes | The password for the user. |
host | no | The value of host can be either a hostname or IP address. If not explicitly defined, a connection to localhost is assumed. |
database | no | The database name. If not explicitly defined, a connection is made to the default database as defined by the MySQL server. |
port | no | If port is defined and is not zero, the value is used as the port number for the TCP connection. |
compress | no | 0 or 1. If set to 1, MySQL's client/server compression protocol is used. |
timeout | no | Connection timeout in seconds. |
Components of the connection string may be separated with , or ;
The connection string may or may not be enclosed within quotes depending on
the contents of its components. At a minimum, a user and password is necessary.
To hide any sensitive connection information from prying eyes, an encoded string may be used. The utility fxencode is available for such encoding.
query_tables <client_string_array>
Returns the names of all tables that exist in the currently connected database. This list is also selectable by the following command:
iselect * from fxtables
client_info
Displays version information for the client side MySQL library.
server_info
Displays version information for the MySQL Database server that is currently being connected to.
display_types
Displays the Fire/MySQL data type mappings that are supported.
In addition to the above commands, a number of MySQL utility commands can also be used. For example show tables can be executed, the results can then be fetched into an appropriate fire variable.
The following table gives the mappings between MySQL datatypes and the Eim data which the translator produces to represent them:
MySQL |
Eim/Fire |
MYSQL_TYPE_BIT |
numeric |
MYSQL_TYPE_TINY |
numeric |
MYSQL_TYPE_SHORT |
numeric |
MYSQL_TYPE_LONG |
numeric |
MYSQL_TYPE_DECIMAL |
numeric |
MYSQL_TYPE_NEWDECIMAL |
numeric |
MYSQL_TYPE_FLOAT |
numeric |
MYSQL_TYPE_DOUBLE |
numeric |
MYSQL_TYPE_INT24 |
numeric |
MYSQL_TYPE_LONGLONG |
numeric |
MYSQL_TYPE_STRING |
string |
MYSQL_TYPE_VAR_STRING |
string |
MYSQL_TYPE_BLOB |
blob |
MYSQL_TYPE_DATE |
time |
MYSQL_TYPE_TIME |
time |
MYSQL_TYPE_DATETIME |
time |
MYSQL_TYPE_TIMESTAMP |
time |
MYSQL_TYPE_GEOMETRY |
not supported |