无法连接到远程MySQL数据库一段时间

时间:2014-11-16 18:00:30

标签: mysql asp.net-mvc database

我有一个连接到ASP.NET MVC的Mysql DB。在本地它工作正常,但连接到远程服务器有时它工作正常,有时它有问题。

任何解决这个问题的想法都会受到赞赏。

The underlying provider failed on Open.
*************************
MySql.Data.MySqlClient.MySqlException (0x80004005): Authentication to host 'aleppo-cuisine.com' for user 'xxx' using method 'mysql_native_password' failed with message: Reading from the stream has failed. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Reading from the stream has failed. ---> System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at MySql.Data.Common.MyNetworkStream.HandleOrRethrowException(Exception e)
   at MySql.Data.Common.MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.TimedStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32 offset, Int32 count)

0 个答案:

没有答案