Hello,
I'm trying to get php4, apache2, and mysql3.23 to work on an rh9 machine.
I've installed those packages via rpm during the install. If i load this in
a page:
<? phpinfo(); ?>
and call it test.php then browse to it, i get php output. In that output it
is confirmed that mysql support is enabled.
When i installed mysql i ran:
mysql_install_d b
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:
mysql -p
entered the root password:
GRANT ALL PRIVILEGES ON example.* TO
DataBaseUser@lo calhost
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","Dat abaseUser","pas sword");
mysql_select_db ("example", $connection);
and when i load the page i get the can not connect, access denied.
Suggestions welcome.
Thanks.
Dave.
I'm trying to get php4, apache2, and mysql3.23 to work on an rh9 machine.
I've installed those packages via rpm during the install. If i load this in
a page:
<? phpinfo(); ?>
and call it test.php then browse to it, i get php output. In that output it
is confirmed that mysql support is enabled.
When i installed mysql i ran:
mysql_install_d b
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:
mysql -p
entered the root password:
GRANT ALL PRIVILEGES ON example.* TO
DataBaseUser@lo calhost
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","Dat abaseUser","pas sword");
mysql_select_db ("example", $connection);
and when i load the page i get the can not connect, access denied.
Suggestions welcome.
Thanks.
Dave.
Comment