PDA

View Full Version : MySQL difficulty, using PowWeb as my mySQL Host


Keaner
10-22-02, 05:26 PM
I am having difficulty with my site, which i am creating for my school. It is in my opinion quite nice, but that is not the point. I am positive that all of my code works as intended due to the fact that i tested it on a closed network machine. Anyway...

My problem is this. Every time i try to connect using my script, i get the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/warrenhills2/home.asp, line 19

This points to a line that includes the following statement:

strConnection="DSN=www.warrennet2.org;Database=whhs;UID=whhs;PWD= *{correct password}*;"

Oddly enough, i have no problem accessing the database in mySQL-Front using the same parameters. Ive checked, and even case matches completely. I am at my wits end, and have no idea how to fix this. Any help would be appreciated. In case anyone wondered, the site is here : http://www.warrennet.org/warrenhills2

alphadesk
10-22-02, 05:40 PM
It looks like you are trying to access .asp page which powweb does not support.

/warrenhills2/home.asp, line 19

Keaner
10-22-02, 05:45 PM
the page is hosted by my school. i only have the database on the powweb pages. i need to figure out how i can get them to work together. It would seem that the database should allow access to anything with the correct un and pw, including off site pages.

I would appreciate it if anyone has a solution, especially any powweb mods or equally gifted people.

FlyinV
10-22-02, 07:48 PM
I don't know a lot about ASP and ODBC -- I much prefer just to stick in the PHP/mySQL world...

But I think you need to take a look at the data you have for ODBC to connect to your database here at Powweb.

It looks like it can't find the data source you told it to use.

Also -- Sometimes you can not connect to databases from outside the localhost - So I don't know if you can do the type of thing you want to do -- That is connect to a powweb mySQL database from a different server.

It would be interesting to know if the mySQL connections are limited to "localhost" connections or if anything can connect to them. I have always wanted to try a few things that did that but my hosts always had it set to localhost only.

mikem
10-22-02, 08:56 PM
Originally posted by FlyinV
I don't know a lot about ASP and ODBC -- I much prefer just to stick in the PHP/mySQL world...

But I think you need to take a look at the data you have for ODBC to connect to your database here at Powweb.

It looks like it can't find the data source you told it to use.

Also -- Sometimes you can not connect to databases from outside the localhost - So I don't know if you can do the type of thing you want to do -- That is connect to a powweb mySQL database from a different server.

It would be interesting to know if the mySQL connections are limited to "localhost" connections or if anything can connect to them. I have always wanted to try a few things that did that but my hosts always had it set to localhost only.

Yes you can. I had a test site up for a little while OFF of poweb servers and I was connected to mySQL on Powweb servers with the testsite just fine. Granted it was PHP, so right on track. ODBC maybe somethign different.

Make sure you are specifying the server name that the database is on

i.e. comet.powweb.com

and your Database name, DB uname and DB pass all correctly.

mikem

HalfaBee
10-22-02, 10:20 PM
You can't use ASP files to access mysql. You will have to write the pages in php or cgi to use the powweb DB.

You also have to specify server.powweb.com instead of localhost as the server.

Hope this helps
HalfaBee

dgm3574
10-23-02, 01:48 AM
That's not quite accurate. You should be able to make it work, by using the MyODBC drivers on the machine with ASP on it.

I have successfully linked MS Access to MySQL through MyODBC.

http://www.mysql.com/downloads/api-myodbc.html

SLSTEK
10-23-02, 02:16 AM
Yes -- dgm3574 is right; you can do it via MyODBC (either local MySQL works or also remote MySQL as is installed on Powweb servers along with PHP to support bulletin boards, etc.). Powweb only has the MySQL link to their/your Powweb database(s).

Look here about setting up your local system to "add a data source" that links to the Powweb MySQL server such as callisto.powweb.com with a "database name", "username", and "password":

http://www.mysql.com/products/myodbc/faq.html#MyODBC_3.51

Then you can do local ASP -> ODBC (MyODBC) -> MySQL on Powweb sites.

I also run phpMyAdmin locally on my on system and access local MySQL databases for development and testing, but also have access to my MySQL database on Powweb servers remotely (to do backups, restores, maintenance, etc.) and works great without having to put any phpMyAdmin files on the Powweb servers.

This is nice to use: www.phpMyAdmin.com

Keaner
10-23-02, 09:05 AM
Thank you SLSTEK, i think your solution is what i need to do. I mailed tech support and they gave me some crap about not being able to have asp sites access the database. Now that i think about it, i do need to install the ODBC.


Thank you all.