Top | Previous | Next |
Connecting to MySQL |
Selecting the driver After creating a new connection from the Databases>Connections section of the gateway, select MySQL ConnectorJ.
Connect URL MySQL uses the following URL format:
jdbc:mysql://hostaddress:3306/database
The hostaddress will be the address of the machine with MySQL installed, for example: localhost, 192.168.1.1, db-server, etc. The database parameter will dictate which database schema the connection will target. It's important to understand that a MySQL server can host many database files. The connection will target one database.
Extra Connection Parameters By default, there is one extra connection parameter defined, zeroDateTimeBehavior. It is usually not necessary to add more parameters. However, if you are inserting non-Latin characters into a database, you may need to add a character encoding connection parameter, such as characterEncoding=UTF-8. |