Params property
Previous  Top  Next

See Also Properties Methods Events Example
Unit
MySQLServer

Applies to
TMySQLServer component

Declaration
property Params: TStrings;

Description
This property is applicable just before a connection is made to the MySQL Server. The property of the TMySQLServer currently supports three sections which are valid in this string list, ex:

...  
[direct]  
ssl-key=./client-key.pem  
ssl-cert=./client-cert.pem  
ssl-ca=./cacert.pem  
ssl-capath=./  
ssl-cipher=ALL:-AES:-EXP  
connect_timeout=60  
read_timeout=60  
write_timeout=60  
...  
[client]  
connect_timeout=60  
read_timeout=60  
host=localhost  
port=3306  
user=root  
password=  
 
[embedded]  
basedir=c:/mysql  
write_timeout=60  
...  

All three sections support the "connect_timeout"/"read_timeout"/"write_timeout" keys which usually defaults to 0 (unlimited/default) for mysql clients which corresponds to the MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_READ_TIMEOUT and MYSQL_OPT_WRITE_TIMEOUT options of the mysql_options() function in MySQL, see MySQL Manual
for more details. All three sections also supports the ssl-* keys, see MySQL Manual for more on SSL and these keys and values. All sections are also passed onto their respective driver Options properties.

NOTE: If you set new values for a specific section, it will override any custom keys/values you may have set for the respective driver Options property before.

The "client" section also supports overriding any properties you may have set on the TMySQLComponent itself, thus host, username, password and port.

The "embedded" section is read and passed to the embedded driver when you select it using the DriverKind property. The "embedded" section supports all the standard mysql server commandline arguments and my.cnf settings, see MySQL Manual
for more details.

In general though, you have no need to set anything in the Params for normal usage of the MyComponents. Follow these guidelines for special use of the MyComponents:
·If you use the Direct driver, you may set and override the timeout keys and ssl paths if you have a need to use SSL, but this is not compulsory.  
·If you use the Embedded driver and have no embedded options set in your my.cnf files on your machine you will be highly advised to set at least a basedir for your embedded driver, so it can find it's database. You may also wish to set other mysql server properties if your database directory structure is not the default mysql database directory structure, for example specifying a datadir and language etc. Besides this you may set the timeouts and SSL paths as well, but this is not compulsory.  
·If you use the Client driver, you may override the host, username, password and port properties of the TMySQLServer component and also set and override the timeout keys and ssl paths if you have a need to use SSL, but this is not compulsory.