Can't connect to MySQL server (10048)
Posted on 2006-05-10
Can't connect to MySQL server on 'localhost'
I am getting this error when attempting to do a query on mysql. The connection is setup on an Asp.NET ASPX page where it successfully queries for data. Then, the connection is passed into a shared function (a class not on the asp.net page) and then fails. The odd thing is this all works the first time around (page load) and then fails on the post back (second time around).
ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10048)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.Odbc.OdbcException: ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10048)
Line 497: DBCommand = New System.Data.Odbc.OdbcDataAdapter(strSQL.ToString, conn)
Line 498: DBCommand.Fill(DSPageData, "properties")