我正在尝试在Solaris 10上使用Mono 2.8.1使用MySQL数据库。为此,我正在尝试使用官方的MySQL Connector/Net。但是我遇到了以下异常:
System.Net.Sockets.SocketException: Protocol option not supported
at System.Net.Sockets.Socket.GetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName) [0x00000] in <filename unknown>:0
at System.Net.Sockets.Socket.get_ReceiveTimeout () [0x00000] in <filename unknown>:0
at System.Net.Sockets.NetworkStream.get_ReadTimeout () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.TimedStream..ctor (System.IO.Stream baseStream) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) MySql.Data.MySqlClient.TimedStream:.ctor (System.IO.Stream)
at MySql.Data.MySqlClient.MySqlStream..ctor (System.IO.Stream baseStream, System.Text.Encoding encoding, Boolean compress) [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.NativeDriver.Open () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.Driver.Open () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection () [0x00000] in <filename unknown>:0
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver () [0x00000] in <filename unknown>:0
显然,Solaris不支持ReceiveTimeout
,而连接器(间接)使用它。
有没有什么方法可以解决这个异常?或者在Solaris上另一种使用MySQL数据库的方式?