You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jon Drukman <js...@cluttered.com> on 2003/08/21 03:28:30 UTC

[users@httpd] Re: apache/mysql errors....

bruce wrote:
> Hi...
> 
> A mysql/Apache issue:
> 
> I get the following when I'm trying to run a test web site on an Apache
> 2.0/RH8.0 setup.
> 
> --------------------------------
> Warning: Access denied for user: 'apache@localhost' (Using password: YES) in
> /var/www/html/dbid/mysql/database.php on line 17
> 
> Warning: MySQL Connection Failed: Access denied for user: 'apache@localhost'
> (Using password: YES) in /var/www/html/dbid/mysql/database.php on line 17
> Could not connect: Access denied for user: 'apache@localhost' (Using
> password: YES)
> ---------------------------------
> 

log in to your mysql server as root or some other sufficiently 
privileged account and execute:

grant select on *.* to apache@localhost identified by 'yourpasswordhere';

this will let apache select from any table in any database.  if you want 
to grant additional permissions or restrict anything then you should 
read the mysql manual for details of the GRANT command.

you don't need to restart or anything.  the user/pw combo should be 
instantly available.

-jsd-



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Re: apache/mysql errors....

Posted by "Roger B.A. Klorese" <ro...@queernet.org>.
> But I believe it requires the FLUSH PRIVILEGES; to make mysql 
> update the privilege modification of the GRANT .

I believe you only need to do that if you update the tables directly
rather than via GRANT.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: apache/mysql errors....

Posted by Leif W <wa...@usa.net>.
----- Original Message ----- 
From: "Jon Drukman" <js...@cluttered.com>
To: <us...@httpd.apache.org>
Cc: <my...@lists.mysql.com>
Sent: Wednesday, August 20, 2003 9:28 PM
Subject: [users@httpd] Re: apache/mysql errors....


> grant select on *.* to apache@localhost identified by 'yourpasswordhere';

[...]

> you don't need to restart or anything.  the user/pw combo should be
> instantly available.

But I believe it requires the FLUSH PRIVILEGES; to make mysql update the
privilege modification of the GRANT .

Leif



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org