----- Original Message ----- From: "Richard Kurth" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 15, 2001 8:16 Subject: Grant > I am looking for different views about this > I have a few question about Granting privileges to a user > > 1. Do you have to give them GRANT SELECT,INSERT,UPDATE, > DELETE,CREATE,REFERENCES,DROP,INDEX,ALTER for them to use > their database? No, only those that they will need to do their job. > > 2. Is it best to give them the least amount of privileges? Yes, just enough to do their job. > > 3. Is this the best way to do it were this gives no privileges in the > user database and all the privileges in the db database > GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,REFERENCES,DROP,INDEX,ALTER ON > $userdatabase.* TO '$newuser'@'$domaname' IDENTIFIED BY '$newuserpass' > > 4. How would I wright this to give them privileges in the host > database. You can't look at it that way. Some commands put them in both db and user tables, while others could put them in other tables but that's not important. It is better to understand what the actual command is doing and what you want to achieve. In other words, what rights do you want to give the user? In this case, you're granting $newuser the right to access $userdatabase from the domain $domaname, with the listed privileges. > > For your information I have read the Manual a number of times I am > just looking for other views. > > Best regards, > Richard > mailto:[EMAIL PROTECTED] > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php