標籤:
(1).我的sql 2008 R2所在的系統為Windows server 2008 *64
(2).MySQL所在的系統為Windows server 2003 *86
我想要實現的是在sql 2008 R2資料庫直接存取MySQL資料庫的資料。
1.安裝MySQL ODBC connector5.3.4
http://dev.mysql.com/downloads/connector/odbc/
2.
安裝MySQL ODBC connector5.3.4驅動提示如下問題:
Error 1918. Error installing ODBC driver MySQL ODBC 5.1 Driver, ODBC error 13: The setup routines for the MySQL ODBC 5.1 Driver could not be loaded due to system error code 126: The specified module could not be found. ...\myodbc5S.dll).. Verify...
原因:需要安裝Microsoft Visual C++ 2010 Redistributable Package 後,才能安裝成功。
連結地址: 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.在ODBC中建立System DSN,命名為“MySQLODBC”
4.然後在sql 2008 R2添加連結的伺服器,資料來源選擇上面的MySQLODBC
串連串:Driver={MySQL ODBC 5.3 ANSI Driver};Server=localhost; Database=test;User=root;Password=root;Option=3;
5.查詢一下
select * from sys.servers
6.查詢mysql資料庫的資料
哈哈,大功告成!
sql 2008 R2添加對MySql的遠程伺服器連結