Switching Database To MySQL

Top  Previous  Next

To use MySQL as LinkServer's database engine, follow the generic instructions from Switching To Another Database Engine article. Here is a list of notes specific to MySQL:

1. Download and install (unpack) MySQL Connector for Java (that's MySQL's JDBC driver). At the time of this writing, it is available at http://www.mysql.com/products/connector/j/.
2. When adding the MySQL driver library to .vmoptions file, specify the full path to MySQL-connector-java-5.X.XX-ga-bin.jar that is located in MySQL Connector installation directory.
3. Set Database Driver in LinkServer Global Configuration Setting to com.mysql.jdbc.Driver. This is the java class name for the MySQL driver.
4. The Database URL setting for the MySQL database has the following format: jdbc:MySQL://[host][:port][/database], where host is the IP or hostname of the MySQL server (can be an empty string or localhost), port is port name on which MySQL server is running (omit this part of URL to use the default value), and database name is the name of database that contains LinkServer's data. You can use linkserver for the database name. For example, if your MySQL server runs at 192.168.0.1 with its default port, use the following URL: jdbc:MySQL://192.168.0.1/linkserver.
5. Set Database Dialect setting to MySQL 5 (MySQL5InnoDBDialect) is you are using MySQL 5 or MySQL (MySQLInnoDBDialect) for older versions.