ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old July 24th, 2003, 03:10 AM
jrom jrom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 jrom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old July 24th, 2003, 04:20 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,711 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 6 Days 4 h 48 m 21 sec
Reputation Power: 259
No root and ODBC have to be (and root is) MySQL users, you should find them in database mysql table users

Reply With Quote
  #3  
Old July 24th, 2003, 06:56 AM
jrom jrom is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 jrom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Problem accessing mysql from asp.net


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway