Using MySQL
IWS can interface with MySQL databases, but to do so, you must install an ADO.Net provider for MySQL.
The provider required by IWS is MySQL Connector/Net, and at the time of this writing, the necessary software can be downloaded from the official MySQL site. (Please note that the linked site is beyond our control and may change without notice.)
Once the provider is installed, you can use the Database Configuration property sheet to configure a MySQL database connection. However, unlike for other database types, you cannot use the Data Link Properties dialog (which is accessed by clicking … to the right of the Connection string box) to form the connection string. Instead, you must directly enter the connection string using this basic format:
Provider=MYSQLCLIENT; Server=myServerAddress; Database=myDataBase; Uid=myUsername; Pwd=myPassword;
The following optional parameters can be appended to the connection string:
Parameter | Description |
---|---|
Port=number; | Specifies what port to use for the connection. The default port is 3306, but any port can be specified as long as it matches the server configuration.
If a port of -1 is specified, then the connection will use the named pipes network protocol (see Protocol below). |
Server=myServerAddress1 & myServerAddress2 & … & myServerAddressN; | Use any server in a replicated server configuration. |
Encryption=true; | Enables SSL encryption for all data sent between the client and the server. The server must have a valid certificate installed. |
Encrypt=true; | An alternative to Encryption above, in case there are errors. |
Default Command Timeout=milliseconds; | Specifies a default command timeout for the connection. This does not supercede any timeout properties on individual commands. |
Connection Timeout=seconds; | Specifies how long the client will wait for a server connection before terminating the attempt. |
Ignore Prepare=true; | Instructs the database provider to ignore Command.Prepare statements, to prevent corruption from server-side prepared commands. |
Protocol=myProtocol; | Specifies which network protocol to use. The default is socket or tcp, but you can specify pipe to use a named pipes connection or memory to use a shared memory object. |
Shared Memory Name=MySQL; | Specifies the name of the shared memory object to be used for communication. (This parameter applies only if the Protocol parameter above is set to memory.) |
CharSet=UTF8; | Specifies which character set to use to encode queries to the server.
Please note that query results are encoded in the same character set that the data itself is recorded. |
Note: These procedures were tested using MySQL v5.1.11 and MySQL Connector/Net v6.2.0.