Connect to MySQL Server (AnyDAC)
From RemObjects Software
This is a AnyDAC Database Connectivity entry
Feel free to add your notes to this topic below.
Supported versions
The AnyDAC native driver supports MySQL Server Community and Enterprise editions version 3.21 and higher.
Client software
AnyDAC requires the LIBMYSQL.DLL client library. Ideally, its version should be equal to the server version. You can take it from the server's distribution Bin folder or download from here.
Connection definition parameters
DriverID=MySQL
|
Parameter |
Description |
Example value |
|---|---|---|
|
Host |
The TCP/IP address of the server running a MySQL server. |
127.0.0.1 |
|
Port |
The TCP/IP port on which MySQL server is listening. |
3306 |
|
Database |
Name of the current database for the connection. If Database is not specified, then no current database is setup. |
MYDB |
|
UserName |
The MySQL user ID. |
Root |
|
Password |
The MySQL user password |
|
|
CharacterSet |
The default character set for the connection. The connection collation becomes the default collation of the character set. See SET NAMES statement for details. |
cp1251 |
|
Compress |
Specify True to enable network trafic compression. By default is False. |
|
|
LoginTimeout |
Controls the amount of time in seconds an application waits for a connection attempt to timeout while waiting to establish a connection. |
30 |
|
ResultMode |
Controls how to fetch result set to a client. Default value is Store.
|
Use |
|
MetaDefCatalog |
Default database name. Design time code will exclude catalog name from object name, if it is equal to MetaDefCatalog. Setting MetaDefCatalog does not change current database in MySQL session. |
MyDB |
Usage cases
- Connect to a server running locally, listening on the default (3306) port
DriverID=MySQL Database=addemo
- Connect to a remote server, listening on a non-default port, using Unicode for character data
DriverID=MySQL Server=mysrv Port=3307 Database=addemo CharacterSet=utf8
See Also
- AnyDAC Database Connectivity
- AnyDAC FAQs
- How to configure AnyDAC Drivers
- How to manage AnyDAC Connection Definitions
Glossary — Features — How To — Components — Tools — Samples — Articles — Architecture — Issues
Categories: Text | AnyDAC | Connection
