The easiest way to do this is to use phpMyAdmin.
Go to the mysql database on your server
Insert a record into the table called 'user'
* enter appropriate value for host (localhost or %)
* fill in user name
* when entering password, select the PASSWORD function
from the pulldown and enter the plaintext initial password
* give them the rights you want (Y=yes, N=no)
* save the record in the database
Go back to the main server page (Home in phpMyAdmin)
Clock on Reload Server
The rights granted in the mysql.user table are global to
the server - i.e. they apply to all current and future
databases.
Regards
Jeff
-----Original Message-----
From: David Bouw [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 11:28 AM
To: Sven Huster
Cc: [EMAIL PROTECTED]
Subject: [PHP] Re: Privilege system of Mysql...
Hi Sven,
Yes, I just started playing with the GRANT syntax..
Only problem is that they first define a user with everything on 'N'
And then they define a table in the DB with everything on Y...
Problem is that you have to do this for all DB's which you want to allow.
This means that newly created DB's should later be added..
This is though very secure, but I am wondering if there is a way to: allow
EVERYTHING but the following in stead of allow NOTHING but the following....
Bye Bye
David
> have you tried the GRANT syntax?
> maybe this helps
> take a look at the grant tables afterwards
>
> regards
>
> Am 11:48 19.03.2001 schrieben Sie:
> >Hi there..
> >
> >I am not understanding something how the mysql priviege system works:
> >
> >I want to do the following:
> >
> >Give a user access to all tables in an database (also tables which will
be
> >added in the future) except a
> >few private tables like the mysql table itself
> >
> >This is the way I thought it should be done:
> >
> >Add a user: '%','username','password','Y',Y','Y','Y','Y','Y','N','N'
etc//
> >Then add the following to table db
> >
> >'%',mysql','username','N',N','N','N','N','N','N','N' etc//
> >
> >Run the Flush privileges command and try it..
> >
> >This doesn't work! Or I am missing something..
> >When I think logically, I can maybe understand that the DB looks at the
> >user table and sees that the uses has access to do everything and doesn't
> >look further at de db table..
> >
> >Is this correct? What is then the solution to do what I described above..
> >
> >I looked at the manual, but I can't seem to figure out in what order the
> >tables are checked..
> >Does it stop looking further when he finds permission to do something or
> >does it stop at the first 'N'...
> >
> >
> >PS: I am not planning to use the above example, but it will help me
> >understand how the privilege system works..
>
> Sven Huster
> Senior Unix System Administrator
> *BSD, Linux, Solaris
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]