On Fri, 14 Feb 2003 11:30:03 +0200
[EMAIL PROTECTED] (Evan Morris) wrote:

> Thanks for all the help everyone sent me on this. However, nothing
> seems to make any difference whatsoever (except putting the
> 'localhost' part in quotes). I am still getting permission denied
> errors based on the user credentials.
> 
> I have entered a user into the user table with host='localhost',
> user='php' and a password.
> I have entered these credentials into the db table also, and given the
> various privileges for this user to the specific database.
> I have run both mysqladmin reload and mysqladmin flush-privileges.
> I have even rebooted the machine.
> I have also tried typing GRANT SELECT,INSERT,DELETE,UPDATE TO
> php@localhost IDENTIFED BY *******, but this just throws up an error
> at the MySQL prompt.
> 

Try:
GRANT ALL PRIVILEGES ON *.* TO php@localhost IDENTIFIED BY 'pass' WITH
GRANT OPTION;
To give user php admin access for testing (you may want to revoke this
later). Remember to:
FLUSH PRIVILEGES;
to put the new privileges into affect.

> My PHP page can still not connect to the database. It just says:
> 
> MySQL Connection Failed: Access denied for user: 'php@localhost'
> (Using password: YES)
> 
> I know the problem is a permissions thing, because if I connect to the
> test database as 'nobody', there is no problem.
> 

Can you connect as php from the prompt?

> Again, any and all help will be appreciated. This is ridiculously
> frustrating, especially since I have no problem connecting to the
> database from a perl script. I am tempted to stop trying to learn PHP
> and build my entire web site using perl cgi instead.
> 
 You might want to create a new user for testing using the GRANT command
above, don't enter anything into the host or db tables as I suspect this
is where things are fouled.

-- 
Mike

Registered Linux User #247123

It was all very well going about pure logic and how the universe was
ruled by logic and the harmony of numbers, but the plain fact was that
the disc was manifestly traversing space on the back of a giant turtle
and the gods had a habit of going round to atheists' houses and smashing
their windows.
(Colour of Magic)

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to