MySQL Conflicts with SharePoint

During a recent setup of MySQL (a product I don’t really know anything about), I ran into an odd issue. After the installation, SharePoint Foundation 2013 stopped working. All sites including Central Administration started having an issue…

 

sharepointmysql001
The dreaded “Sorry, something went wrong” error instead of actual content being loaded.

 

sharepointmysql007
The SharePoint logs recorded lines with an error of:
Application error when access /SitePages/Home.aspx, Error=Access denied for user ”@’localhost’ (using password: NO)
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()

 

sharepointmysql002
After some searching online, there were several threads mentioning that new entries are created in the machine.config file by the MySQL install.

 

sharepointmysql006
I went to find and comment out these lines.

 

sharepointmysql005
The one exception was the runtime lines were mentioned as perhaps being needed, so I skipped those ones.

Then it started working again, so yayyers! Also after fixing it using this method, I also read some pages suggesting the real root cause was one of the MySQL components that writes to machine.config by default, and that this can be changed via Programs and Features if needed. The “MySQL Connector NET 6.9.8” (or whichever version you have) has a sub-feature called “Web Providers”. If you uninstall this, that supposedly also removes these troublesome entries.

 

Some of the pages that pointed me in the right direction:

https://social.technet.microsoft.com/Forums/en-US/3073a508-6021-4bc6-813b-cf658af876ac/sharepoint-and-mysql-server?forum=sharepointadminprevious

http://stackoverflow.com/questions/26189699/asp-net-mvc4-configuration-error-after-installing-mysql-connector-net

Advertisements