Page 3 of 3

Posted: Wed Dec 17, 2003 8:49 am
by Stoker
yaron wrote:GRANT ALL PRIVILEGES ON *.* TO stam@localhost
IDENTIFIED BY '5194351' WITH GRANT OPTION;
Just FYI: That grant gives the stam user ANY right on ANY database and ANY table, meaning it has superuser like access.. It does not make much sense to do this in a scripted environment... if you do want to give someone full rights to their own database, dont grant ON *.*

Posted: Wed Dec 17, 2003 8:57 am
by yaron
Just one more Q about th syntax of Grant.
What comes after ON?
*.* means all databases and all fields?
car I ristrict to spcific databases or certain fields?

Posted: Wed Dec 17, 2003 9:19 am
by Stoker
most answers are in the manual..

Usually you have already selected a database (mysql_select_db()), so if you do NOT use any dot in the ON clause, just enter table nams or a single * for all tables within the database.. if you grant to multiple databases do that with ON db1.*,db2.* and so forth

Posted: Wed Dec 17, 2003 9:58 am
by yaron
Thnaks a lot to all
problem solvd!