jrom
July 25th, 2003, 02:39 PM
I have problems with accessing mysql from asp.net. I have tried to follow the guidance from the official MySQL website. But it doesnt work for me.
This is my code:
Dim myConnString As string = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost;"& _
"DATABASE=krukken_com; UID=root; PASSWORD=mypassword; OPTION=3;"
Dim myCommand As New OdbcCommand(mySelectQuery, myConnection)
myConnection.Open()
The password mypassword was another password but it dosn't matter for the case as long as
The debugger tells me that it is line "myConnection.Open()" that fails.
The error messages is as follows:
ERROR [HY000] [MySQL][ODBC 3.51 Driver]Access denied for user: 'ODBC@127.0.0.1' (Using password: NO) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Access denied for user: 'ODBC@127.0.0.1' (Using password: NO)
I have checked the following:
weather my server really was localhost. Well it was according to the tabel root in mysql. Further more I was also using the right password according to the database.
I tried to access mysql directly with a wrong password and then I got the exact same error message.
I therefor made a user called ODBC well aware that mysql is case sensitive and gave the user a password. It didn't work out so I still have a problem.
I am wondering why it tells me every time that I am not using a password although I am. It seems as if it doesn't really reads the hold myConnstring at least not the password part.
Looking forward to see the solution
JRom
This is my code:
Dim myConnString As string = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost;"& _
"DATABASE=krukken_com; UID=root; PASSWORD=mypassword; OPTION=3;"
Dim myCommand As New OdbcCommand(mySelectQuery, myConnection)
myConnection.Open()
The password mypassword was another password but it dosn't matter for the case as long as
The debugger tells me that it is line "myConnection.Open()" that fails.
The error messages is as follows:
ERROR [HY000] [MySQL][ODBC 3.51 Driver]Access denied for user: 'ODBC@127.0.0.1' (Using password: NO) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Access denied for user: 'ODBC@127.0.0.1' (Using password: NO)
I have checked the following:
weather my server really was localhost. Well it was according to the tabel root in mysql. Further more I was also using the right password according to the database.
I tried to access mysql directly with a wrong password and then I got the exact same error message.
I therefor made a user called ODBC well aware that mysql is case sensitive and gave the user a password. It didn't work out so I still have a problem.
I am wondering why it tells me every time that I am not using a password although I am. It seems as if it doesn't really reads the hold myConnstring at least not the password part.
Looking forward to see the solution
JRom