Win7 SQL Server access to MySQL on a virtual machine

Source: Internet
Author: User
Tags dsn odbc mysql view mysql odbc driver

First, ensure that the Win7 can telnet to the MySQL port, firewall settings can refer to http://www.cnblogs.com/ShanFish/p/6519950.html
Second, configure the System DSN
1. Install MySQL ODBC driver on Win7
2, management tools->ODBC data source, System dsn-> Add, select [MySQL ODBC 5.3 Unicode driver]-> Complete, configure connection information
Third, create a linked server
General provider: [Microsoft OLE DB Provider for ODBC Drivers]; Data Source: 2nd Step Add the System DSN name
"Security" choose to create a connection using this security context, fill in the MySQL database login name and password

--query in SSMsSELECT *  from OPENQUERY(DBLINKVM,'SELECT @ @port, @ @version')SELECT *  from OPENQUERY(DBLINKVM,'select * from Sakila.actor limit')SELECT *  from OPENQUERY(DBLINKVM,'Show CREATE TABLE Complaintdb.area_info')

MySQL view table, field description

#MySQL查看表, field description MySQL> SELECTtable_name,column_name,column_type,is_nullable,column_key,column_comment from(SelectTable_name,column_name,ordinal_position,column_type,is_nullable,column_key,column_comment fromInformation_schema.columnswhereTable_schema='Complaintdb'UNION  AllSELECTTABLE_NAME,"',"',"',"',"', table_comment fromInformation_schema.tableswhereTable_schema='Complaintdb') AORDER  byTABLE_NAME, (ordinal_position+0);

Win7 SQL Server access to MySQL on a virtual machine

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.