How SQL server connects to remote MySQL
Recently encountered"SQLHow to connect remotelyMySQL"Now the problem is finally solved, so I will post the method:(What I useOperating SystemYesWin7, Database isSql2005.)1InSQL ServerServerInstall OnMySQL ODBCDriver;
2After installation,In the management tool-ODBCData Source-SystemDSN-Add-SelectMySQL ODBC 3.51 driver-Complete
MySQL connection parameters are displayed.
Data Source Name: Data Source Name
Decription: description.
Server: MySQLServerIP
Port: MySQL port. The default value is 3306. You can change the value.
User: connection account (the account authorized on MySQL and corresponding permissions)
Password: Password
Database: select the connected database
After filling out the information, click test. The prompt box will pop out.
After successful:
3,Open the SQL database, find the link server, and create the link server. Everyone will, so I will send the parameter. Other common options will not be filled in. OK.
Note: select "Microsoft ole db provider for ODBC drivers" for the access interface ".
Data source: select the created ODBC interface.
4Test:
(Query statement)
Select* From openquery (MySQL,'Select * From table ')
(Insert Statement)
Insert openquery (MySQL,'Select * From table') (ID, name, password) values (8 ,'Zidane ', '123 ')
I used SQL Server 2008. The experiment was successful. Some fields may need type conversion.
From:Http://www.dwway.com/article-8181-1.html