locked
How to connect the SSRS server with MySql database RRS feed

  • Question

  • User-490550226 posted

     Any one can help me?

    How to connect the SSRS server with MySql database

    Tuesday, April 25, 2017 10:26 AM

Answers

  • User2017575498 posted

    Hello,

    Instead, create a linked server in SQL Server that connects to MySQL and use this linked server in Reporting Services. That way, you should have full functionality of Reporting Services. 

    To create the linked server, use the following SQL code in SQL Server Management Studio: 

    -- Add Linked Server 
    EXEC sp_addlinkedserver 'mysqlDB', 'MySQL', 'MSDASQL', Null, Null, 'Driver={MySQL ODBC 3.51 Driver};DB=[DB_NAME];SERVER=[HOSTNAME];uid=[USER];pwd=[PASSWWORD]' 


    -- Set up login mapping using current user's security context 
    EXEC sp_addlinkedsrvlogin 
    @rmtsrvname = 'mysqlDB', 
    @useself = 'TRUE', 
    @locallogin = NULL 
    GO 

    -- List the tables on the linked server 
    EXEC sp_tables_ex 'mysqlDB' 
    GO 

    Credits: MySQL

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 19, 2017 7:50 AM

All replies

  • User-1509636757 posted

    I suggest you check below step by step tutorial: Creating a SSRS report using a mySQL data source

    Also refer: Using SQL Server 2008 Reporting Services (SSRS) with MySQL

    Tuesday, April 25, 2017 11:10 AM
  • User2017575498 posted

    Hello,

    Instead, create a linked server in SQL Server that connects to MySQL and use this linked server in Reporting Services. That way, you should have full functionality of Reporting Services. 

    To create the linked server, use the following SQL code in SQL Server Management Studio: 

    -- Add Linked Server 
    EXEC sp_addlinkedserver 'mysqlDB', 'MySQL', 'MSDASQL', Null, Null, 'Driver={MySQL ODBC 3.51 Driver};DB=[DB_NAME];SERVER=[HOSTNAME];uid=[USER];pwd=[PASSWWORD]' 


    -- Set up login mapping using current user's security context 
    EXEC sp_addlinkedsrvlogin 
    @rmtsrvname = 'mysqlDB', 
    @useself = 'TRUE', 
    @locallogin = NULL 
    GO 

    -- List the tables on the linked server 
    EXEC sp_tables_ex 'mysqlDB' 
    GO 

    Credits: MySQL

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 19, 2017 7:50 AM