I need to grant privileges to all users, I can do:
GRANT select on table TO user1; GRANT select on table TO user2; ...
But there are many users. How can I grant this privilege to all users at once?
I tried:
GRANT select on table TO ALL;
But that doesn't work.
To GRANT ALL privileges to a user , allowing that user full control over a specific database , use the following syntax: mysql> GRANT ALL PRIVILEGES ON database_name.
Use the ALL PRIVILEGES privilege type to grant all of the privileges to the user or role for the specified table. You can also grant one or more table privileges by specifying a privilege-list. Use the DELETE privilege type to grant permission to delete rows from the specified table.
You can use the SQL GRANT statement to grant SQL SELECT, UPDATE, INSERT, DELETE, and other privileges on tables or views. The WITH GRANT OPTION clause indicates that JONES can grant to other users any of the SQL privileges you granted for the ORDER_BACKLOG table.
In general, you grant system privileges only to administrative personnel and application developers. End users normally do not require and should not have the associated capabilities. See Also: For more information about Database Control, see Oracle Database 2 Day DBA.
grant select on table to public;
But be careful when you do that -- make sure it's what you really want to do.
You should use roles. Grant permission to roles. grant roles to users.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With