C
C#2y ago
AAA

❔ SQL Timeout Error Deployed ASP.NET Core app

i just deployed my web app with react and .net core and it runs locally but when i run it on the server i get this error TimeoutException: The operation has timed out. Unknown location
MySqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
MySql.Data.Common.StreamCreator.GetTcpStream(MySqlConnectionStringBuilder settings, ref MyNetworkStream networkStream)

MySqlException: Unable to connect to any of the specified MySQL hosts.
MySql.Data.MySqlClient.NativeDriver.Open()
MySqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
MySql.Data.Common.StreamCreator.GetTcpStream(MySqlConnectionStringBuilder settings, ref MyNetworkStream networkStream)

MySqlException: Unable to connect to any of the specified MySQL hosts.
MySql.Data.MySqlClient.NativeDriver.Open()
https://sptwebapp.azurewebsites.net/login/master anyone knows why
4 Replies
Cracker
Cracker2y ago
it looks like failing to connect MySql server any chance your connection string is localhost ? (dont share your conection string if its public though) where do you host MySql
BananaPie
BananaPie2y ago
can you try to use MySQL workbench to see if you can connect to it?
AAA
AAAOP2y ago
yes that all works MySqlConnectionStringBuilder builder = new MySqlConnectionStringBuilder { Server = "myapp.mysql.database.azure.com", Database = "dbname", UserID = "name", Password = "pass", SslMode = MySqlSslMode.Required, }; this is how i connect so the con string is right
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server