GRANT SHOW DATABASES ON *.* TO [EMAIL PROTECTED]
You use *.* instead of OSMS.* because this is global. You don't need the "IDENTIFIED BY" clause because you already set the password foor this user in your earlier GRANT statements.
If, as I expect, you simply want [EMAIL PROTECTED] to be able to see the OSMS db, then you don't need to do anything beyond the first statement. That user wil be able to see any db he/she has privileges in.
Michael
Roderick Luo wrote:
Hi -
I'm a new user to mysql and have a short question. I ran the following lines:
GRANT ALL PRIVILEGES ON OSMS.* TO [EMAIL PROTECTED] IDENTIFIED BY 'openipmp' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON OSMS.* TO [EMAIL PROTECTED] IDENTIFIED BY 'openipmp' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON OSMS.* TO osms@"%" IDENTIFIED BY 'openipmp' WITH GRANT OPTION; GRANT SHOW DATABASES ON OSMS.* TO [EMAIL PROTECTED] IDENTIFIED BY 'openipmp' WITH GRANT OPTION; GRANT SHOW DATABASES ON OSMS.* TO [EMAIL PROTECTED] IDENTIFIED BY 'openipmp' WITH GRANT OPTION; GRANT SHOW DATABASES ON OSMS.* TO osms@"%" IDENTIFIED BY 'openipmp' WITH GRANT OPTION;
The first three turned out to be ok, but for the last three, I got error messages reading 'Error 1221: Wrong usage of DB GRANT and GLOBAL PRIVILEGES'. What is going on? Why are the last three lines actually necessary when the user has been granted 'all privileges'?
Thank you.
Roderick
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]