469,916 Members | 1,972 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,916 developers. It's quick & easy.


I'm trying to do some database work on an rh9 box. I installed httpd2,
mysq, mysql-server, and php4. I'm having difficulties connecting to a
database via a web page. I'm not sure if i missed something during the
install of the rpms or if i have a problem sql wise, and am hoping someone
can help.
When i installed mysql i ran:
then set a password for the root user. I then logged in as the root user and
ran a grant command for a database i'll call example:

IDENTIFIED BY 'password';

this returned no errors. Again, from the mysql commandline i can log in as
this user, and use the database. I can query it, and add/delete information
from it. My problem comes when i try to access the database via a web page,
both httpd and mysql are on the same box, and i get an access denied
message. Here's my connect string:

$connection = mysql_connect("localhost","DatabaseUser","password ");
mysql_select_db("example", $connection);

and when i load the page i get the can not connect, access denied.
Suggestions welcome.
Jul 19 '05 #1
0 1054

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Aldo Polli | last post: by
1 post views Thread by Chris Haynes | last post: by
5 posts views Thread by Ad Astra | last post: by
1 post views Thread by Matthew Crouch | last post: by
reply views Thread by dave | last post: by
4 posts views Thread by Andy Baxter | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.