Recently encountered the "SQL How to link remote MySQL" Problem, now the problem is finally resolved, special methods posted: (I used the operating system is Win7, the database is SQL2005.) )
1, install the MySQL ODBC driver on the SQL Server server;
http://dev.mysql.com/downloads/mirror.php?id=376346 (Download address)
2, after installation, in the management tool-ODBC data Source-System dsn-Add-Choose MYSQL ODBC 3.51 driver-complete
Will jump out of MySQL connection parameters.
Data Source Name: DataSource names
Decription: Description, casual writing
IP of the Server:mysql server
Port:mysql port, the default is 3306. can be changed.
User: Connect account (authorized on MySQL account, give appropriate permission at the same time)
Password: Password
Database: Selecting linked Databases
After filling, click Test. If successful, it will jump out of the box as shown.
After success:
3, Open the SQL database and find the linked server. Create a linked server, everyone will, so I send the parameters. As shown, the rest of the general options are not required. Ok.
Here, note that the provider will choose Microsoft OLE DB Provider for ODBC Drivers.
Data Source: Select the ODBC interface that was previously created.
4. Test:
(Query statement)
SELECT * from OPENQUERY (MYSQL, select * from table)
(INSERT statement)
Insert openquery (MYSQL, select * from table) (Id,name,password) VALUES (8, "Zidane", "99999")