locked
ERROR: Unable to connect to any of the specified MySQL hosts. RRS feed

  • Question

  • Hi all, 

    I have run into an issue and not able to resolve it. 

    There was a requirement to connecting to a MySQL data source. For that I unknowingly added an entry in the "ODBC Data Source Administrator" -> User DSN & System DSN 

    I was totally unaware that I am breaking my SP setup (Development). Now Central Admin site and all other sites have stopped working. 

    I tried repairing by re-running the config wizard but no use. Error I get is "An unexpected error has occurred." OR "Unable to connect to any of the specified MySQL hosts." 

    But when I try accessing other site, its showing an error from the "machine.config" file: >

    Line 284:    <siteMap>
    Line 285:      <providers>
    Line 286:        <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />
    Line 287:      </providers>
    Line 288:    </siteMap>

    Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config 

    For record, I have already removed those entries from that User DSN & System DSN. Still error persists. 

    If some has ANY IDEA how to resolve it... please help! 


    Regards, Nayan

    Tuesday, April 28, 2015 12:36 PM

Answers

  • Hi Nayan,

    I faced the same problem as you encounter. I have Googling for 1 hours. This is the MySQL Connector bugs.  For some solution is to comment out the config in machine.config file.

    the path of machine.config file as below

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config 

    <!--        <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, 
    
    MySql.Web.v20, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" 
    
    connectionStringName="LocalMySqlServer" applicationName="/" /> -->

    But this solution not work for me.

    So the next solution is to change the installation file by go to control panel -> program -> select Mysql connector and select change. uncheck the web provider and next all the way. Then the issues resolve. Hope it help.

    Regards,

    RenneHong

    • Marked as answer by Nayan N Wednesday, November 18, 2015 1:06 PM
    Friday, July 3, 2015 2:41 AM
  • Hi Renne,

    Yes I had ultimately implemented the same workaround to overcome this.

    After commenting many such tags which get added automatically after installing MySQL connector 6.9; our setup starts working again.


    Regards, Nayan

    • Marked as answer by Nayan N Wednesday, November 18, 2015 1:06 PM
    Thursday, August 6, 2015 1:38 PM

All replies

  • Can you give us a description of what is happening? Errors form the Application and System Event Log, and/or ULS logs?

    Trevor Seward

    Follow or contact me at...

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Tuesday, April 28, 2015 9:50 PM
  • Hi Nayan,

    I faced the same problem as you encounter. I have Googling for 1 hours. This is the MySQL Connector bugs.  For some solution is to comment out the config in machine.config file.

    the path of machine.config file as below

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config 

    <!--        <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, 
    
    MySql.Web.v20, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" 
    
    connectionStringName="LocalMySqlServer" applicationName="/" /> -->

    But this solution not work for me.

    So the next solution is to change the installation file by go to control panel -> program -> select Mysql connector and select change. uncheck the web provider and next all the way. Then the issues resolve. Hope it help.

    Regards,

    RenneHong

    • Marked as answer by Nayan N Wednesday, November 18, 2015 1:06 PM
    Friday, July 3, 2015 2:41 AM
  • Hi Renne,

    Yes I had ultimately implemented the same workaround to overcome this.

    After commenting many such tags which get added automatically after installing MySQL connector 6.9; our setup starts working again.


    Regards, Nayan

    • Marked as answer by Nayan N Wednesday, November 18, 2015 1:06 PM
    Thursday, August 6, 2015 1:38 PM
  • Wow thanks for this one :) but what is the consequences for unchecked web provider?
    Wednesday, August 12, 2015 2:39 PM
  • Yes it is working in my case. Thanks
    • Proposed as answer by Pradip G Friday, September 4, 2015 7:22 AM
    • Unproposed as answer by Nayan N Wednesday, November 18, 2015 1:04 PM
    Friday, September 4, 2015 7:22 AM
  • "This is the MySQL Connector bugs." Not in my case... had the same issue. I could clearly see in the SharePoint logs it evaluating the provider’s collection and crashing mysteriously when the MySQL section was enumerated. IIS and all my other sites etc are perfectly fine with MySQL provider’s registration, never had a problem with it ever.  The only time this cropped up was when I attempted to install SharePoint foundation, just doesn’t play nice with others that all.
    Thursday, December 3, 2015 8:17 PM
  • For anyone this did not work for, try putting this in your web.config - it worked for me

    <

    siteMap>

          <

    providers>

            <

    removename="MySqlSiteMapProvider"/>

          </

    providers>

        </

    siteMap>

    Tuesday, July 12, 2016 7:50 PM
  • Thanks, this worked for me. 

    But by removing the Web provider from the Mysql connector, is it not going to negatively affect some other apps depending on it? 

    Wednesday, March 1, 2017 10:40 AM
  • Commenting the MySQL ref worked for me.
    Wednesday, July 19, 2017 6:55 PM
  • RenneHong,

    Thank you!  I have been trying to track down the solution for the past two hours and was moments away from trying to reprovision my Central Admin Site when I found this solution and it worked perfectly (I went ahead and just changed the MySQL configuration).  You just saved me an evening of heartache.

    All Best,

    E.F. Magnuson

    Friday, March 30, 2018 12:07 AM
  • Thanks for the advice, this worked for me.
    Wednesday, September 4, 2019 3:09 PM
  • Removing MySQL connector has worked for me in getting over this issue. 
    Friday, June 26, 2020 9:25 PM