Questions tagged [sql-grant]

GRANT is a standard SQL command that authorizes a set of users to perform a set of operations on an object.

The basic structure of the REVOKE statement is:

GRANT <permissions-list> ON <object> TO <user-or-role-list>
    [WITH GRANT OPTION];

There are various options in standard SQL and most SQL DBMS provide their own extensions to what is specified by the standard.

711 questions
0
votes
1 answer

using the "grant options" command i want to assign the exact privileges as one user to another in MYSQL

Not sure if this can be done but from everything I read it seems possible, just not sure how to code it. at best I would imagine it would look something like CREATE USER user1@localhost IDENTIFIED BY 'passwd'; GRANT OPTIONS userA ON test TO…
0
votes
1 answer

PL/SQL code to grant a new user select privs on views owned by another user

Need help with this...New to PL/SQL. Where am I going wrong? DECLARE CREATE or REPLACE PROCEDURE grant_view_privs IS sys_refcursor; strVIEWS Varchar2(1000); strQuery varchar2(4000); BEGIN open result for select…
0
votes
1 answer

GRANT Database Permissions on Windows Azure

Im using asp.net mvc4 using azure sql-database and I have problem with initial database with the following command: WebSecurity.InitializeDatabaseConnection("AdminDBConnection", "UserProfile", "UserId", "UserName", autoCreateTables: true); A…
raholsn
  • 658
  • 1
  • 7
  • 15
0
votes
1 answer

The difference between MySQL wildcards for granting permissions

What is the difference between *, %, Any in the username/host fields when granting permissions to a user, and how would the combination of them differ? For example: GRANT ALL PRIVILEGES ON db.* TO '*'@'Any'; would this be the same as GRANT ALL…
xiankai
  • 2,773
  • 3
  • 25
  • 31
0
votes
1 answer

Not able to select a table even if having SELECT privilege

I have two users, USER1 and USER2. USER1 has privilege to create table and USER2 does not have this privilege. USER1 has created a table called EMPLOYEE and granted the select privilege on that table to USER2: ====== Using USER1 credentials…
Microsoft DN
  • 9,706
  • 10
  • 51
  • 71
0
votes
2 answers

SQL Server 2000 - View list of sprocs with GRANT EXECUTE for a particular role exclusively?

There are approx 500 sprocs in my SQLSERVER 2000 database; each sproc has a typical Grant Execute statement similar to the following. GRANT EXECUTE ON [dbo].[sproc_name] TO [role1], [role2], [role3], [role4], etc... How to view the names of…
joedotnot
  • 4,810
  • 8
  • 59
  • 91
0
votes
2 answers

User with no permissions can still SELECT

I'm fairly new to MySQL and I've been creating test tables, etc. Anyway, I created a new user, using CREATE USER 'myUser'@'localhost' IDENTIFIED BY 'myPassword'; Now, when I log into this user, I can SELECT from a table I created with root earlier. …
Interminable
  • 1,338
  • 3
  • 21
  • 52
0
votes
2 answers

Grant user permission using wildcard on MYSQL

I'd like to grant for example an select permission for specific user in all databases on my server started by WA_ for example in my server I make the following syntax but it dosent work grant select on `wa\_%`.`mytable` to 'myuser'@'localhost'…
KimoKono
  • 91
  • 2
  • 5
0
votes
4 answers

creating user in mysql using java

In MySQL command line client after logging in as root, I typed: connect mydb; grant all privileges on mydb.* to 'admin'@'localhost' identified by 'pass'; Now within Java, I succesfully connect to the db using the admin userid using drivers. …
Xperiaz X
  • 216
  • 1
  • 6
  • 16
0
votes
1 answer

mysql reset root user privileges

I have installed wampserver. i revoke the the delete privilege from root user. now i want to grant same privilege back to root user but it gives the error: i tried the following command GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY…
user1543848
  • 29
  • 1
  • 10
0
votes
2 answers

Granting privileges on MySQL

I have a MySQL database that I'm using for testing of a C# application. As a superuser, I enter the following 'query': GRANT ALL PRIVILEGES ON testing.* TO 'Ubuntu'@'localhost'; to an affirmative message. Then, I log out of the database, log back…
nerdenator
  • 1,265
  • 2
  • 18
  • 35
0
votes
0 answers

Mysql global privileges all tables except one

Is it possibile to set ALL PRIVILEGES to an user and than deny it only for specific one? I need to grant a user to create and populate new databases, however he must not change one specific private database. For new database creation I need to add…
Tobia
  • 9,165
  • 28
  • 114
  • 219
0
votes
2 answers

MySQL Users and All Privileges

Ok, I'm trying to add a user to a MySQL database. This user should be able to add other users to the database it has privileges for. So I did this: GRANT ALL privileges ON thedbname.* TO 'topuser'@'%' IDENTIFIED BY 'pass'; However, I this user…
ajr
  • 81
  • 2
  • 4
  • 9
0
votes
2 answers

GRANT ROLE inside a trigger?

is there a way in Oracle to execute the GRANT someRole TO someUser; command inside a trigger? I tried it, but it does not seem to work. Thanks a lot.
jlnme
  • 31
  • 3
0
votes
1 answer

System.exit(0) without grant possible under security manager

System.exit(0); or System.exit(2); are posiible to execute without error, run with java -Djava.security.manager -Djava.security.policy==app.policy -cp bin pl.com.App app.policy: grant { permission java.io.FilePermission "./*",…
bastiat
  • 1,799
  • 2
  • 19
  • 38