SQL Server R2 link mysql 5.6

Source: Internet
Author: User
Tags dsn

1. Start installing MySQL 5.6, the beginning of the egg ache

Download MySQL 5.6.

If you and I do not plan to learn more about MySQL, be sure to download the MSI format installation files, download Zip archive is a nightmare start, I have been a nightmare for most of the day.

Archive format is similar to the completion of the installation of files, without installation, you need to manually modify the configuration file inside.

I am still accustomed to the next step of the next fool-style installation.

2. Download MySQL connectors and install

Next step is OK.

3. Configure an ODBC data source

Windows 8.1-Control Panel--Administrative Tools--ODBC data source

ODBC Data Source Manager---System DSN---add-mysql ODBC 5.3 ANSI Driver (MySQL ODBC Unicode Driver)---complete

4. Create a MySQL linked server from SSMs

ssms--server Object--linked server--new linked server

Linked server: IP address or first name (my test environment is native, so the IP address is 127.0.0.1, with the name I will write MySQL, automatic capitalization)

Access interface: Microsoft OLE DB Provider for ODBC Drivers

Product Name: MySQL

Data Source: The name of the system DSN that you just created in the ODBC data source

In the ' Security ' Selection page, choose to establish a link using this security context

5. Accessing the MySQL Database

Select  from OpenQuery (MYSQL,' select * from Test.pet ')

 into OpenQuery (MYSQL,' select * from Test.pet 'values(' xxxx',' xxxx ', 'xxxx ',' m ') ,null,null); Select  from OpenQuery (MYSQL,' select * from Test.pet ');

I can see it from above. OPENQUERY (MYSQL, ' select * from Test.pet ') is like a table or view

In fact MySQL also provides a tool similar to SSMS---MySQL WorkBench, which provides the ability to connect to a remote MySQL server

Related Article

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.