❔ 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.

anyone knows why
A/CAtakan / Cracker2/8/2023
it looks like failing to connect MySql server
A/CAtakan / Cracker2/8/2023
any chance your connection string is localhost ? (dont share your conection string if its public though)
A/CAtakan / Cracker2/8/2023
where do you host MySql
can you try to use MySQL workbench to see if you can connect to it?
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
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.