Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


LinkedServer help

Posted on 2007-10-15
Medium Priority
Last Modified: 2012-05-05
Hello there,

i am trying to link my MySQL db to work with SSRS.Somewhere i read that i need to use linked server.i managed to run the first two query,but when i run the third query i get an error mentioned below.please help me solve this. the mysql db is not on my computer.
also i dont know what those query do.can you please explain what those query do.please help.


EXEC sp_addlinkedserver 'mysqlDB', 'MySQL', 'MSDASQL', Null, Null, 'Driver={MySQL ODBC 3.51 Driver};DB=[Customer];SERVER=[];uid=[report];pwd=[services]'

EXEC sp_addlinkedsrvlogin
@rmtsrvname = 'mysqlDB',
@useself = 'TRUE',
@locallogin = NULL

EXEC sp_tables_ex 'mysqlDB'

OLE DB provider "MSDASQL" for linked server "mysqlDB" returned message "[MySQL][ODBC 3.51 Driver]Unknown MySQL server host '[]' (11004)".
Msg 7303, Level 16, State 1, Procedure sp_tables_ex, Line 41
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "mysqlDB".
Question by:zolf
  • 2
  • 2
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 2000 total points
ID: 20077056
this should work better:

EXEC sp_addlinkedserver 'mysqlDB', 'MySQL', 'MSDASQL', Null, Null, 'Driver={MySQL ODBC 3.51 Driver};DB=[Customer];SERVER='

EXEC sp_addlinkedsrvlogin
@rmtsrvname = 'mysqlDB',
@useself = 'FALSE',
@locallogin = NULL,
@rmtuser ='report',
@rmtpassword = 'services'

Author Comment

ID: 20077077

Thanks mate

Author Comment

ID: 20077079

Can you please explain what does those query do.
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20077164
actually, I removed the [] around the ip address (which was simply wrong).
next, I "moved" the login settings from the linked server to the linked server login, where it should be.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Loops Section Overview

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question