Re: Connect User from website does not work.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I have created a user "webuser" with the following line.
>
>
>
> mysql> grant all privileges on *.* to webuser@Sarreid2 identified by
> 'xxxxxx';
>
> mysql> grant all privileges on *.* to webuser@localhost identified by
> 'xxxxxx';
>
>
>
> I would think that this should have unlimited access to the database
> from the website.?
>
> I can connect to mysql from the command line using the user webuser. I
> received no errors when I created the user and verified that the user
> exist in the user database.
>
>
>
> When I try to connect to the database I get the following error:
>
>
>
> Warning: Access denied for user: 'webuser@www.Sarreid2.com' (Using
> password: YES) in /var/www/html/count/get_conf.inc.php on line 4
>
> Warning: MySQL Connection Failed: Access denied for user:
> 'webuser@www.Sarreid2.com' (Using password: YES) in
> /var/www/html/count/get_conf.inc.php on line 4

As you can see from the error message, you're not connecting from
"localhost". When trying to connect from a PHP script, MySQL sees you as
coming from a host www.Sarreid2.com. So, use another GRANT command to also
grant your user permission from this host.

---John Holmes...


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux