Hello,
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:
mysql_install_db
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:
GRANT ALL PRIVILEGES ON example.* TO
DataBaseUser@localhost
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.
Thanks.
Dave.