ASP connect to MYSQL error 80004005

geoffreyblue

New Member
Full error:\[code\]Microsoft OLE DB Provider for ODBC Drivers error '80004005'[MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP' (10065)/test.asp, line 17 \[/code\]Attempting to connect to a MySQL database using ASP. Getting the above error, I'm not sure why. Apparently the error number means data not accessible, but it's not saying why.Anyone have any experience with this?\[code\]<%Dim oConn, oRsDim qry, connectstrDim db_name, db_username, db_userpasswordDim db_serverdb_server = "IP"db_name = "DBNAME"db_username = "USERNAME"db_userpassword = "PASS"fieldname = "FIELDNAME"tablename = "TABLENAME"connectstr = "Driver={MySQL ODBC 3.51 Driver};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpasswordSet oConn = Server.CreateObject("ADODB.Connection")oConn.Open connectstrqry = "SELECT * FROM " & tablenameSet oRS = oConn.Execute(qry)if not oRS.EOF thenwhile not oRS.EOFresponse.write ucase(fieldname) & ": " & oRs.Fields(fieldname) & "<br>"oRS.movenextwendoRS.closeend ifSet oRs = nothingSet oConn = nothing%> \[/code\]Values removed for obvious reasons.
 
Top