NHibernate, MySQL, Windows Server 2003 — connection problems

别等时光非礼了梦想. 提交于 2020-02-05 03:40:06

问题


We're using MySQL (5.0.x) on Windows, in an ASP.NET MVC app. Recently, we started using NHibernate in a lot of places, and it works great in the ASP.NET app.

On Vista and Windows Server 2008, it still works great everywhere. We've also got a couple command-line tools that use the same codebase, and they work everywhere except on our Windows Server 2003 boxes (otherwise identical to the WS2K8 in every way we can imagine). It seems to be having trouble making connections:

TIMESTAMP_HERE [1] WARN  NHibernate.Util.ADOExceptionReporter - MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown.
   at MySql.Data.MySqlClient.NativeDriver.Open()
   --- End of inner exception stack trace ---
   at MySql.Data.MySqlClient.NativeDriver.Open()
   at MySql.Data.MySqlClient.MySqlConnection.Open()
   at Our.Common.Services.OurConnectionProvider.GetConnection() inc:\OUR_CODE\blah...\OurConnectionProvider.cs:line 99
   at NHibernate.Impl.SessionFactoryImpl.OpenConnection()

Does this sound familiar to anybody? Is there any way in which W2K3 would be different from W2K8/Vista that would affect NHibernate making connections to MySQL?

来源:https://stackoverflow.com/questions/936486/nhibernate-mysql-windows-server-2003-connection-problems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!