Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection String from db.asp to MySQL DB

Status
Not open for further replies.

lynque

IS-IT--Management
Sep 30, 2004
124
CA
Back Again,

I have a project that was originally developed to run on an access db due to it's lack of traffic, now I trying have the same project use MySQL as it's db in anticipation of more traffic.

Below is the connection string for my Dev (local) site.

Code:
ConString = "Driver={MySQL ODBC 3.51 Driver}; Server=216.251.43.11; Database=c:/program files/mysql/MySQL Server 4.1/cdi_cdnsys_com; UID=****; PWD=****; Option=3"

I get this error when I try to run the page

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I'm running IIS on Win 2000pro.

Any help is much appreciated
 
Try:

The one thing you must keep in mind is that you can provide the name of a database, not the system filename of a database. MySQL is more akin to SQL Server than Access in that it is a client/server database engine and the engine is the only software that ever touches the actual database files on the filesystem.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Thanks sleipnir214,

I looked at the link you posted last and tried out what was suggested there, unfortunately I am getting the same error.

Code:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/Cart/search.asp, line 15

Line 15 is simply a call to the ConString in db.asp which is included in all of the cart files.
I don't know if this helps but the main page is also .asp and it calls global.asa with no error.
 
Sorry here is the current ConString

Code:
ConString = "Driver={MySql ODBC 3.51 Driver}; Server=localhost; uid=root; pwd=root; database=cdi_cdnsys_com; option=3; port=3306;"
 
Again, I am a newbie to this so I assumed that when you install MySQL it would come with the required drivers, like IIS does.
I'll do that and try it out again.

Thanks
 
I now have thew correct driver installed and was getting the authentication protocol not supported consider upgrading client error.
I added a completely new user to the MySQL User db with all privilages and am now getting the original

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

error.

Kind of feels like I'm going in circles, this might be an easy fix for an experienced MySQL person but I am really green at this so thanks in advance.
 
I apologize, found a typo and have corrected it... Woops

Now getting this

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[MySQL][ODBC 3.51 Driver]Access denied for user 'program'@'localhost' (using password: YES)

This is the new user I created with all privaliges

googling...
 
Ok, made some progress.
New user is what I am using and I flushed privaliges, the error coming back now is...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[MySQL][ODBC 3.51 Driver]Host 'localhost' is not allowed to connect to this MySQL server

I am using IIS on Win2000pro locally, any known conflicts?
 
Exactly how did you create the new user? MySQL's user credentials are not simply a 2-tuple of "username" and "password". MySQL's user credentials are a 3-tuple that include those two things as well as the host from which the user may connect. It is more than possible, for example, for a user to be able to connect from another machine, but not from localhost.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I used MySQL Front and added a host-user-password in the user table under MySQL, and just defaulted to all privilages.
 
localhost, I tried the IP addie as well. No Go
 
Did you issue a FLUSH PRIVILEGES query after adding the user? I don't recall how MySQL-Front actually creates the users.

Can you see the data for the new user in your "mysql" database?


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top