(1). My SQL R2 is located on a system that is Windows Server 2008 *64
(2). MySQL resides on a system that is Windows Server 2003 *86
What I want to achieve is to access the MySQL database data directly in the SQL R2 database.
1. Install MySQL ODBC connector5.3.4
http://dev.mysql.com/downloads/connector/odbc/
2.
Installing the MySQL ODBC connector5.3.4 driver prompts the following questions:
Error1918.Error installingODBC DriverMysqlOdbc5.1Driver,ODBC Error13: the setup routines for the mysql ODBC 5.1 driver could not is loaded due to system error Code 126: the specified module could not be found .... \myodbc5s.dll). verify ...
Cause: the Microsoft Visual C + + redistributable Package needs to be installed before the installation succeeds.
Link Address: 64-bit version:
http://www.microsoft.com/en-us/download/confirmation.aspx?id=14632
32-bit version:
http://www.microsoft.com/en-gb/download/details.aspx?id=5555
3. Establish the system DSN in ODBC named "MYSQLODBC"
4. Then add the linked server in SQL R2, the data source select the MYSQLODBC above
Connection string:driver={mysql ODBC 5.3 ANSI Driver}; Server=localhost; Database=test; User=root; password=root;option=3;
5. Check
Select * from Sys.servers
6. Querying MySQL database data
Haha, it's done!
SQL R2 Add a remote server link to MySQL