Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 7th, 2005, 09:50 PM
Authorized User
 
Join Date: Sep 2003
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
 
Old February 8th, 2005, 05:40 AM
Friend of Wrox
 
Join Date: Jun 2003
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.
 
Old February 8th, 2005, 09:52 AM
Authorized User
 
Join Date: Sep 2003
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
 
Old February 8th, 2005, 10:49 AM
Friend of Wrox
 
Join Date: Jun 2003
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.
 
Old February 8th, 2005, 08:40 PM
Authorized User
 
Join Date: Sep 2003
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
 
Old March 7th, 2005, 11:15 AM
Registered User
 
Join Date: Mar 2005
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.





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





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