How SQL Server connects to remote MySQL

Source: Internet
Author: User

Recently, I encountered the problem of "how to connect SQL to remote MySQL", and now the problem is finally solved. I posted the method: (my operating system is Win7, and the database is SQL2005 .)

1. Install the mysql odbc driver on the SQL SERVER;

Http://dev.mysql.com/downloads/mirror.php? Id = 376346 ()

2. After installation, choose "Management Tools"> "ODBC Data Source"> "system DSN"> "add"> "mysql odbc 3.51 DRIVER"> "complete ".

MYSQL connection parameters are displayed.

Data Source Name: Data Source Name

Decription: description.

Server: IP address of the MYSQL Server

Port: MYSQL Port. The default value is 3306. You can change the value.

User: The account authorized by the connection account on mysql, and the corresponding permissions are granted)

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 and find the link to the server. you can create a linked server, so I will send the parameter ., other options are not required. OK.

Note: select "Microsoft ole db Provider for ODBC Drivers" for the access interface ".

Data source: select the created ODBC interface.

4. test:

Query Statement)

 
 
  1. SELECT   *   FROM  OPENQUERY(MYSQL, 'select   *   from   table '  ) 

Insert Statement)

 
 
  1. Insert openquery (MYSQL, 'select * from table') (id, name, password) values (8, 'zidane ', '2016 ')

Original article title: how to connect SQL to remote MySQL 1)

Link: http://www.cnblogs.com/guolebin7/archive/2010/08/21/1805162.html

Edit recommendations]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.