Re: [phplib] How do I setup the database user permissions From: Joel Sutton (jsutton <email protected>)
Date: 12/11/00

I think that this is more a MySQL issue than a PHPlib issue.

The best guide for this stuff is:

http://www.mysql.com/documentation/mysql/commented/manual.php?section=GRANT

My might also consider confirming that mysql is working correctly by using
the mysql command from the shell prompt. eg:

$ mysql -h mydatabaseserver.com -u webuser -p password123 mydatabasename

Good luck.

Cheers, Joel...

On Sun, 10 Dec 2000, fates wrote:

> Is there a faq somewhere?
>
> I get the following error: see my grants for webuser below
>
> Database error: cannot use database kris
> MySQL Error: 1044 (Access denied for user: 'webuser <email protected>' to
> database 'kris')
> Session halted.
>
> or I get when I change it to host to localhost:
>
> Warning: Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (111) in
> /home/httpd/html/phplib/php/db_mysql.inc on line 73
> Database error: pconnect(localhost, webuser, $Password) failed.
> MySQL Error: ()
> Session halted.
>
> local.inc has the following:
> class DB_Example extends DB_Sql {
> var $Host = "localhost"; also tried my domain.
> var $Database = "kris";
> var $User = "webuser";
>
> Here is my grant table for webuser <email protected> and database kris:
> Grants for webuser <email protected> |
> +----------------------------------------------------------------------+
>
> | GRANT SELECT ON kris.* TO 'webuser'@'localhost' |
>
> I am running the latest Gamma MySQL version and I added the database
> called kris using the file in the stuff directory.
>
> How do I set up the permissions for the database user? I have a user
> setup called webuser.
>
> I use Linux with php4.0.3p1 and using mod_php
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>