MySQL connection errors on Vault Server

A collection of information about Vault, including solutions to common problems.

Moderator: SourceGear


Posts: 8451
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
PostPosted: Wed Jun 14, 2017 8:12 am
Issue

When MySQL is installed on a Vault Server, you may encounter problems using Vault. For example, logging in with the Vault website login page (http://<your Vault server>/vaultservice/vaultweb) will fail. Upon inspection of the Vault Server Log look for errors claiming the Vault Server cannot connect to MySQL.

Code: Select all
----1/1/2012 4:59:02 PM   --VAULT1(10.1.1.225)--SSL Disabled   Uncaught Exception: Host 'VAULT1' is not allowed to connect to this MySQL server (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config line 284)

or

----1/1/2012 12:24:19 PM   --VAULT1(10.1.1.225)--SSL Disabled   Uncaught Exception: Authentication to host 'VAULT1' for user 'X' using method 'mysql_native_password' failed with message: Access denied for user ''@'localhost' (using password: NO) (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config line 275)
Inner Exception: Authentication to host 'VAULT1' for user 'X' using method 'mysql_native_password' failed with message: Access denied for user ''@'localhost' (using password: NO)
Inner Exception: Access denied for user ''@'localhost' (using password: NO)


Root Cause

It appears when MySQL is installed, by default it will install a "Web Providers" component which will override the handling of the "ConnectString" found in EVERY web.config on that IIS Server. This causes an issue since Vault web.config's ConnectString is designed for SQL Server.


Possible Solutions (You should only need to pick one to solve the problem.)

1. Remove the WebProviders component from the MySQL installation or uninstall / reinstall MySQL but use the Custom installation and do not choose the MySQL WebProviders component.

2. Add the following to the web.config within the Vault Server's IIS directory.
Code: Select all
<configuration>
  <system.web>
  ...
    <siteMap>
      <providers>
        <remove name="MySqlSiteMapProvider" />
      </providers>
    </siteMap>
  ...
  </system.web>
</configuration>


3. There are additional solutions users have performed for other products on the web that might work as well. One such example was posted by a user in our forum: viewtopic.php?f=48&t=22384
Beth Kieler
SourceGear Technical Support

Return to Knowledge Base (Vault)

Who is online

Users browsing this forum: No registered users and 3 guests

cron