Try Now
More in this section

Forums / Bugs & Issues / MySql Authentication Error on Site Launch

MySql Authentication Error on Site Launch

4 posts, 0 answered
  1. Chris
    Chris avatar
    5 posts
    26 Oct 2010
    05 Mar 2015
    Link to this post

    Hello, just in the evaluation stage right now and after 3 days, I've yet to get a site up and going. Using MySql as our database, I created a new project, proceeded through the steps nicely entering correct authentication information for my local DB and set up my "most powerful user" but then continue to get authentication errors when the site is meant to launch (I think).

    The error looks like Sitefinity is not persisting my DB credentials as seen by the error  Authentication to host '' for user '' - which should be 'localhost' and 'root'. A quick check in the web.config in my local project did not reveal any connection sections. Where is Sitefinity getting the DB connection details from project to project?


    Thanks. CM>

  2. Grisha 'Greg' Karanikolov
    Grisha 'Greg' Karanikolov avatar
    156 posts
    25 Oct 2016
    09 Mar 2015
    Link to this post
    Hi Chris,

    You must first ensure that a create privileges is granted for your user in order to allow Sitefinity to create database under MySQL server.
    You can also try to to add the following attribute to the connection string since there is some issue when creating databases in MySQL from external systems:
    persist security info=true

    For more detailed information check the startup project requirements here.
    Some more important notes:
    You must have created a database and the have the appropriate database credentials.
    Sitefinity supports MySQL version between 5.0.3 and 5.5.
    By default, MySQL installs with 100 connections. We recommend that you do not decrease this number.
    If you want to use MySQL, you can have multilingual scenarios only in split tables mode.
    NOTE: If your website is going to use non-Latin characters, you must verify that the MySQL Server option default-character-set is set to utf8. You can do this during the installation process or, on a later stage, by editing the my.ini file, which, by default, is located in C:\Program Files\MySQL\MySQL Server VERSION\.
    IMPORTANT: If you have selected Microsoft SQL Server or MySQL, you must have the following permissions:
    If you want Sitefinity to create the SQL database, than the account you are using to connect to your SQL server must have create database permissions.
    For Microsoft SQL Server the application pool identity should be assigned as db_owner for the Membership and DB schema as it should perform all CRUD operations, including "create" and "drop" (creating/deleting using Sitefinity backend GUI custom fields, custom modules or upgrading). For MySQL the user must have CREATE DDL Right.
    If you want to connect to an already existing database, the user that you are using to authenticate on the SQL server must have permissions to read and write to tables and to alter the database schema.
    For Microsoft SQL Server the user must be assigned to db_datareader, db_datawriter, and db_ddladmin database roles and for MySQL the user must have Object Rights – Select, Insert, Update, Delete and DDL Rights – Alter, Index.

    Hope this is useful.

    Grisha 'Greg' Karanikolov
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
  3. Chris
    Chris avatar
    5 posts
    26 Oct 2010
    26 Mar 2015 in reply to Grisha 'Greg' Karanikolov
    Link to this post

    Hello Grisha,

    Thanks for some ideas on what to look for. 

    The database is being created fine during the initial setup steps. i'm using the root user with full CREATE permissions so no problems with user privilege. We are using MySQL 5.6 which is outside of your supported list. Hopefully this isn't the problem.


    I was able to find where Sitefinity stores the connection string using this article http://docs.sitefinity.com/administration-move-the-database-connection-string-in-the-web-config-file and as an experiment I moved it to the web.config in the root of the site, but was still getting errors about lack of credentials in the machine.config.


    I even added basic connection details into the machine.config residing in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config which got me past connection errors. The new error was then:

    The system cannot find the file specified

    Full error attached. At this point I'm not sure where to go.


  4. Chris
    Chris avatar
    5 posts
    26 Oct 2010
    30 Mar 2015 in reply to Chris
    Link to this post

    We've had some success with this issue. After having installed Sitefinity on three systems, it worked on one. 


    System 1: Win 7, MySQL 5.6, Visual Studio 2013 = MySQL error on launch

    System 2: Win 8, MySQL 5.6, Visual Studio 2013 = MySQL error on launch

    System 3: Win 7, MySQL 5.6, no development tools = Sitefinity launches!


    Currently I don't have more granular details on what is causing the failure. The two development systems have Oracle's MySQL .Net Connector installed which is needed for working with MySQL in Visual Studio / .NET

4 posts, 0 answered