SQL Database Access - MySQL
MySQL driver module allows to use MySQL client library.
Driver Name
The name of the MySQL driver to be passed to SQL.Databases.Create subprogram is "MYSQL".
Driver's Options
Supported options are listed in the table below, see MySQL documentation for detailed description of options.
database | Connect to this database |
host | Host name of IP address of the server |
password | User's password |
port | Port number |
socket | UNIX socket |
user | User name |
Supported data types
Following types are supported:
MySQL data type | Ada data type |
---|---|
BIGINT | Universal Integer |
CHAR | League.Strings.Universal_String |
DATE | League.Calendars.Date |
DATETIME | League.Calendars.Date_Time |
DOUBLE | Universal Float |
FLOAT | Universal Float |
INTEGER | Universal Integer |
MEDIUMINT | Universal Integer |
SHORTINT | Universal Integer |
TIMESTAMP | League.Calendars.Date_Time |
TINYINT | Universal Integer |
VARCHAR | League.Strings.Universal_String |
Build Instructions
MySQL client library is detected and used automatically. For successful detection of MySQL client library mysql_config program must be installed and available. On some Linux distributions (we observed this on Ubuntu 11.04 x86) and Microsoft Windows automatic configuration facility is unable to detect MySQL client library; in this case you can specify path to shared libraries using --with-mysql-libdir command line switch, for example:
./configure --with-mysql-libdir=/usr/lib"