|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Problem accessing mysql from asp.net
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 debugger tells me that it is line <quote>myConnection.Open()</quote> it 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 error message that "access denied for user: root@127.0.0.1 using password : yes". So if I compare the two messages an interpret them then it means that there was expected to be a table called odbc to login to for the same user. But that can't be true. What am I missing here. Looking forward to see the solution. JRom |
|
#2
|
||||
|
||||
|
No root and ODBC have to be (and root is) MySQL users, you should find them in database mysql table users
|
|
#3
|
|||
|
|||
|
Thankyou for your quick respons.
Ofcourse you are right about the interpretaion of root and odbc! But I still have a problem because although I have set up a user called ODBC@localhost and ODBC@127.0.0.1 now I still get the same error message. My code is Dim myConnString As string = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost;"& _ "DATABASE=krukken_com; UID=ODBC; PASSWORD=myNewpassword; OPTION=3;" the only things changed is UID and password. Although I also tried with: server= 127.0.0.1; In short I tried with different server, uid and password identification which should match the error message and had them set up in the database, but nothing helped: The error message is as before: 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) What is wrong? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Problem accessing mysql from asp.net |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|