Results 1 to 3 of 3
I have apache and php4 (and php4-mysql) running on my webserver. When trying to access the db from a PHP script, I get this:
Code:
Warning: Access denied for user: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-28-2003 #1
mysql/PHP question
I have apache and php4 (and php4-mysql) running on my webserver. When trying to access the db from a PHP script, I get this:
I've used this command to add guest:Code:Warning: Access denied for user: 'guest@evocation' (Using password: YES) in /pub/www/media.php on line 25 Warning: MySQL Connection Failed: Access denied for user: 'guest@evocation' (Using password: YES) in /pub/www/media.php on line 25 Unable to open connection.
And here's the PHP snippet that should handle the connection:Code:grant select on Media.* to guest@'%' identified by 'guest';
Anyone have any clues as to why I can't connect?Code:$link = mysql_connect( "evocation", "guest", "guest" ) or die( "Unable to open connection." );
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy
- 12-28-2003 #2Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
after doing your mysql grant statement, you then need to do a "Flush privilages" statement as well.
Jason
- 12-28-2003 #3
Schweet. That worked. Thanks, J. Now all I have to do is learn some PHP.
"Time is an illusion. Lunchtime, doubly so."
~Douglas Adams, The Hitchhiker's Guide to the Galaxy


Reply With Quote
