STRIGANOV SERGEY: Software development.

Разработка программного обеспечения на: C++, T-SQL, VBS, JavaScript, PHP

MS SQL Server 2005/2008 Express: add MySQL as Linked server

1 - Download and install Connector from: 
http://dev.mysql.com/downloads/connector/odbc 

2 - Edit and run SQL - script:   (Replace: Server, Port, User name, Password)

 

 

 

 


 mysql-linkedserver.sql

/****** Object:  LinkedServer [MYSQL_Server]    Script Date: 02/22/2011 12:36:27 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'MYSQL_Server', @srvproduct=N'MySQL', @provider=N'MSDASQL', @provstr=N'DRIVER={MySQL ODBC 5.1 Driver}; SERVER=127.0.0.1; PORT=33239; UID=root; PASSWORD=dfhgadfh; OPTION=3'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'MYSQL_Server',@useself=N'False',@locallogin=NULL,@rmtuser=N'root',@rmtpassword='dfhgadfh'
/* test */
select * from OPENQUERY ([MYSQL_Server], 'select * from vtigercrm520.vtiger_groups')


Add comment