Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Bryan 3 posts 64 karma points
    Nov 07, 2014 @ 19:20

    MySQL Connection error for site that doesn't Use MySQL

    I'm new to Umbraco and iIve been trying to get a new site up. Whenever I try to Publish a document, I get the following error.

    Unable to connect to any of the specified MySQL hosts.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. 

    Stack Trace: 

    at MySql.Data.MySqlClient.NativeDriver.Open()
       at MySql.Data.MySqlClient.Driver.Open()
       at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
       at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
       at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
       at MySql.Data.MySqlClient.MySqlPool.GetConnection()
       at MySql.Data.MySqlClient.MySqlConnection.Open()
       at MySql.Web.Common.SchemaManager.GetSchemaVersion(String connectionString)
       at MySql.Web.Common.SchemaManager.CheckSchema(String connectionString, NameValueCollection config)
       at MySql.Web.SiteMap.MySqlSiteMapProvider.Initialize(String name, NameValueCollection config)
       at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)


    the problem is I'm not Useing a MySQL database.  I'm Using a MS SQL database.  I've been searching around and I can't seem to find any one who's had this problem before.  All other functions of the website work just fine.  and after attempting to Publish a document, the document properties for the "Link to Document" show as 

    I've Installed Umbtaco 7.1.8 from the Webplatform Installer and From Nuget. 

    I can install one of the default templates and the whole site works fine unless I try to publish a new document.

    If i start from a New site I can made the first root document at ~/  but then all other documents fail to publish.

    I do have the MySQL for Visual Studio, MySQL .Net Connector, and MySQL ODBC Connector installed for an unrelated project.  But i'd like to see all my options before I remove them.

    My connection string bellow


        <remove name="umbracoDbDSN" />

        <add name="umbracoDbDSN" connectionString="server=BRYAN-LAPTOP\SQLEXPRESS;database=UmbracoTemplate;user id=UmbracoTemplate;password=****" providerName="System.Data.SqlClient" />


  • Bryan 3 posts 64 karma points
    Nov 07, 2014 @ 22:42


    Uninstalling MySQL for Visual Studio, MySQL .Net Connector, and MySQL ODBC Connector worked.

    I don't know which one the culprit is though.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Nov 07, 2014 @ 22:43
    Dennis Aaen

    Hi Bryan and welcome to our,

    I know that if you see the minium system requirements here for Umbraco 7, it says that you could use a MySQL datbase, but I think tthe truth is that this database has not gotten much attention, and especially not after the SQLCE database become available to use when Umbraco. 

    So my advice to you is that to use a Microsoft SQL database, or to use the bult in SQLCE database, and since you are using the Umbraco 7, then installer is setup to use the SQLCE default, but as you already has discovered you can change it to use another database.

    I know that is not the answer that you was hoping for.

    Hope this helps, anyway.


  • Bryan 3 posts 64 karma points
    Nov 07, 2014 @ 22:53

    Thanks for the reply

    But was using Microsoft SQL for a database connection and getting MySQL errors.

    It looks like though that the MySQL connectors I had installed where sneaking into my .Net

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 08, 2014 @ 09:15
    Jan Skovgaard

    Hi Bryan

    Sounds like an issue with the 3rd party software rather than Umbraco itself. Do you have other .NET based applications running, that don't rely on Umbraco? If so did you ever experience the issue on those? If the issue is related to Umbraco it's something that should be filed as an issue on the issue tracker I think.

    But I suspect this is something that would happen outside an Umbraco context as well though.

    But glad you managed to get up and running :)

    Happy Umbracoing.


  • Mike 10 posts 73 karma points
    Nov 18, 2014 @ 01:44

    I'm getting this exact same problem. I have installed umbraco using SQLCE, not mysql. When I create a new content item I get the same error as above. I noticed that the content Items are created if I refresh.

    I do have mysql installed for other projects so the data providers would be installed in the machine.config. Is umbraco doing something weird were its grabbing a data provider from the machine config or something? 

    (See Attached)


  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Nov 18, 2014 @ 01:53
    Nicholas Westby

    I had a very similar issue. The fix was to run the MySQL installer and have it uninstall the .NET Connector for MySQL:

    The issue is apparently that the installer modifies your machine.config, which may affect any .NET project.

  • Mike 10 posts 73 karma points
    Nov 18, 2014 @ 02:13

    Done some more digging looks like the bug is in umbraco.presentaion\content.cs ln 368:


    I know nothing of the umbraco source but looks like the SiteMap provider is doing something weird, I'll keep digging. If anyone know anyone on how this Sitemap provider is working please chime in

  • Mike 10 posts 73 karma points
    Nov 18, 2014 @ 02:23

    Looks like the issue is with MySql installing a default siteMap provider in the machine config:



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



    ** TO FIX **

    Add the following to your umbraco web.config under the system.web section:


    <providers> <remove name="MySqlSiteMapProvider" />  </providers>



    Someone should probably log this as a MySql bug

  • Paul Seal 524 posts 2889 karma points MVP 6x c-trib
    Jul 24, 2015 @ 07:59
    Paul Seal

    Thank you so much.

    I was having this problem too and this solved it instantly.

  • Jonas Eriksson 930 posts 1825 karma points
    Mar 27, 2015 @ 15:47
    Jonas Eriksson

    Solved my issue - was going crazy - could not publish nodes in a new installation because of this. Thanks a lot for providing the fix Mike.

    / Jonas

  • Marcin Zajkowski 112 posts 585 karma points MVP 6x c-trib
    May 05, 2015 @ 17:35
    Marcin Zajkowski

    I was also fighting with this issue. Shame that I can't upvote yet, but Mike - you have my upvote when I reach minimum karma level :) Thank you! #hi5yr

  • Ehsan 8 posts 30 karma points
    May 08, 2015 @ 05:52


    I was very close to change the Hosting Company I'm with.

    Placing the following in the web.config fixed it!

    <siteMap>    <providers> <remove name="MySqlSiteMapProvider" />  </providers> </siteMap>
  • jake williamson 207 posts 872 karma points
    Jun 11, 2015 @ 09:10
    jake williamson

    chaps, i found this post after going through a world of pain with the exact same issue re umbraco busting after installing mysql...

    although the web.config update at a site level fixes the problem, i'm now in the tricky situation of ALL of the umbraco sites i run on my machine failing!

    i can go through an update all the web.configs but this is confusing to the other devs who don't have mysql installed and are questioning why this setting is even in there...

    does anybody know of a machine level fix for this?! i'm hunting around at the mo but though i'd pop the question here ;)



  • Chris 34 posts 134 karma points
    Jun 18, 2015 @ 14:37

    Same issue, was using MS SQL server but installed MySql onto my workstation that caused this.

    Adding the extra xml tag to web.config as described fixed it

  • hernan 1 post 21 karma points
    Jul 14, 2015 @ 04:10

    Thank you very much.The problem was solve Ok Uninstalling the Conectors!!!

  • mellogrand 4 posts 25 karma points
    Oct 07, 2015 @ 10:06

    Same issue starting fron github code with Visual Studio. MySql gets around even if I work and setup web.config for SQL Server. fix works, but is there any action taken from Umbraco to solve this ?

  • Sebastiaan Janssen 5045 posts 15478 karma points MVP admin hq
    Oct 27, 2015 @ 10:04
    Sebastiaan Janssen

    @mellogrand Yes, this is being fixed for 7.3.1:

    So the web config snippet will be added by default as of 7.3.1!

  • Sumesh KP 34 posts 107 karma points c-trib
    Jun 25, 2018 @ 09:06
    Sumesh KP


    Your solution saved me :)

Please Sign in or register to post replies

Write your reply to: