我正在尝试连接localhost
:(45000
它是通往我的宝塔 MySQL 的隧道)
但是在 webmatrix 中我得到了这个错误:
Call to GetHostEntry failed after 00:00:00 while querying for hostname 'localhost:45000': SocketErrorCode=HostNotFound, ErrorCode=11001, NativeErrorCode=11001.
MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Call to GetHostEntry failed after 00:00:00 while querying for hostname 'localhost:45000': SocketErrorCode=HostNotFound, ErrorCode=11001, NativeErrorCode=11001. ---> System.Net.Sockets.SocketException: No such host is known
at System.Net.Dns.GetAddrInfo(String name)
at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at MySql.Data.Common.StreamCreator.GetDnsHostEntry(String hostname)
--- End of inner exception stack trace ---
at MySql.Data.Common.StreamCreator.GetDnsHostEntry(String hostname)
at MySql.Data.Common.StreamCreator.GetHostEntry(String hostname)
at MySql.Data.Common.StreamCreator.GetStreamFromHost(String pipeName, String hostName, UInt32 timeout)
at MySql.Data.Common.StreamCreator.GetStream(UInt32 timeout)
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Microsoft.WebMatrix.DatabaseManager.MySqlDatabase.MySqlDatabaseProvider.TestConnection(String connectionString)
at Microsoft.WebMatrix.DatabaseManager.IisDbManagerModuleService.TestConnection(DatabaseConnection databaseConnection, String configPathState)
at Microsoft.WebMatrix.DatabaseManager.Client.ClientConnection.Test(ManagementConfigurationPath configPath)
at Microsoft.WebMatrix.DatabaseManager.Client.DatabaseHierarchyInfo.EnsureLoaded()
是不是 webmatrix 不能处理 45000 端口?(否则它可以工作(在 MySQL-WorkBench 中)。)