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