接続文字列として別のサーバーのMySQLデータベースを使用して、.NETアプリケーションをAzureに展開することは可能ですか?別のサーバーデータベースを使用して.NETアプリケーションをAzureに展開する
.NET MVCでアプリケーションを作成しました。私のプライベートサーバのMySQLデータベースに接続します。アプリケーションは正常に動作します。しかし、Azureサーバーにデプロイすると、動作しません。
[MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.]
MySql.Data.MySqlClient.NativeDriver.Open() +1228
MySql.Data.MySqlClient.Driver.Open() +22
MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +218
MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +287
MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +93
MySql.Data.MySqlClient.MySqlPool.GetConnection() +65
MySql.Data.MySqlClient.MySqlConnection.Open() +566
System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +41
マイたconnectionString:
私はAzureのサーバでそれを実行するとが、私はエラーを取得する:私は公開しようとすると
、私は、データソースとしてMySQLを持っていません
<connectionStrings>
<add name="myEntities" connectionString="metadata=res://*/Models.MyModel.csdl|res://*/Models.MyModel.ssdl|res://*/Models.MyModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=myServer;user id=userName;password=Password;database=myDB"" providerName="System.Data.EntityClient" />
</connectionStrings>
誰でも修正方法を知っていますか?
ありがとうございました
あなたのMySQLサーバがどこにホストされているか教えていただけますか? Azure、別のホスティングプロバイダ、またはあなたのマシンでですか? –
別のホスティングプロバイダ – user6824563