Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 7th, 2005, 09:50 PM
Authorized User
 
Join Date: Sep 2003
Location: , , Mexico.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to renee_santoscoi
Default connection error MYSQL and ASP

Hi,
I'm testing mySQL with ASP, but I can not stablish the connection betwen the ODBC and the ASP. This is the error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[MySQL][ODBC 3.51 Driver]Access denied for user 'ODBC'@'localhost' (using password: NO)

I installed the ODBC Driver and created the DSN. My code in ASP:
   set conn=server.CreateObject("ADODB.Connection")
   conn.connectionstring="DSN=faqs"
   conn.open
the data in the DSN are:
user:root, pwd: faqs, server: localhost, database: dbfaqs
Do I need create a new userid, or what do I need check????
Thanks.


renees
__________________
renees
Reply With Quote
  #2 (permalink)  
Old February 8th, 2005, 05:40 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It has been a while since I have contacted a MySQL database from ASP, however it seems like your connection string is wrong. It seems like you are trying to log on to the database as user 'ODBC' and from the machine from where the database is installed (localhost), but without a password ('ODBC'@'localhost' (using password: NO)).

You want to log on as 'root' with the other info you supplied; perhaps you should post your connection string. The error is probably caused by you logging on as a user which hasn't been granted the correct rights in the tables user, host and db in the mysql database.

You can check to see if the user 'ODBC' is at all in the user table.

Hope it helps.

Jacob.
Reply With Quote
  #3 (permalink)  
Old February 8th, 2005, 09:52 AM
Authorized User
 
Join Date: Sep 2003
Location: , , Mexico.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to renee_santoscoi
Default

Hi,
thanks for your advice, I coded this:

dim conn
dim conn_string
conn_string = "Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=test001;USER=roo t;PASSWORD=test;OPTION=3;"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open(conn_string)

But I got this error:
   Error Type:
   Provider (0x8000FFFF)
   Catastrophic failure
Any suggestion??? Do I need configure something???

thanks.

renees
Reply With Quote
  #4 (permalink)  
Old February 8th, 2005, 10:49 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have e recently connected to a MySQL database using ODBC and I used pretty much the same structure in the connection string, however one small difference; try changing USER to UID.

And remember to close the connection again. That is the nice thing to do.

Hope it helps.

Jacob.
Reply With Quote
  #5 (permalink)  
Old February 8th, 2005, 08:40 PM
Authorized User
 
Join Date: Sep 2003
Location: , , Mexico.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to renee_santoscoi
Default

Thanks,
I changed USER for UID, I still got the error:
Error Type:
Provider (0x8000FFFF)
Catastrophic failure

any suggestion?


renees
Reply With Quote
  #6 (permalink)  
Old March 7th, 2005, 11:15 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had the same problem with the 3.51.10 driver. Downloaded the new driver ( 3.51.11 ) from mysql.com and my problems went away.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP connection to MySQL ells228 Classic ASP Databases 5 June 21st, 2017 01:38 PM
MySQL lost connection error melkin Classic ASP Basics 1 October 27th, 2007 06:37 AM
Asp and Mysql Connection surendran Classic ASP Basics 3 September 15th, 2005 05:22 AM
ASP Connection to MySQL fs22 Classic ASP Databases 1 August 18th, 2004 11:35 PM



All times are GMT -4. The time now is 05:30 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.