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
4
votes
2 answers

Change owner of Postgres table automatically?

I have a database shared by many users, all the users are in a group "example" and the vast majority of objects in the database are owned by "example". Very occasionally a user will create a new table - that table gets assigned to the user who…
J. Doe
  • 555
  • 1
  • 6
  • 15
4
votes
1 answer

Whats included in "ALL [PRIVILEGES]"?

Which privileges are given when I grant "ALL PRIVILEGES"? -> ALL [PRIVILEGES] Grant all privileges at specified access level except GRANT OPTION Does this include "FILE"-privilege?
CodingMonkey
  • 65
  • 1
  • 6
4
votes
1 answer

Grant remote access to mysql for an ipv6 subnet

This is a similar question to How to grant remote access to MySQL for a whole subnet?, but with an IPv6 subnet. According to https://dev.mysql.com/doc/refman/5.5/en/account-names.html, the host_ip/netmask format is not allowed for IPv6. So how do I…
roblabla
  • 113
  • 1
  • 10
4
votes
3 answers

How to view only procedure related grants in MySQL?

I want to see only grant privileges on a particular procedure in MySQL. This documentation shows all grants. Is there a way to see grants only for a particular procedure in a db. The below command gives all grants including select, update etc.…
Raghuram Vadapalli
  • 1,190
  • 2
  • 13
  • 27
4
votes
2 answers

How to check permission SYSTEM_ALERT_WINDOW is granted on Android Lollipop?

Note that I'm talking about Android Lollipop. For android 6.0 we can use method canDrawOverlays() to check that SYSTEM_ALERT_WINDOW is granted or not. With Android Lollipop, almost devices grant this permission by default. But on some devices of…
TOP
  • 2,574
  • 5
  • 35
  • 60
4
votes
5 answers

How to make a GRANT persist for a table that's being dropped and re-created?

I'm on a fairly new project where we're still modifying the design of our Oracle 11g database tables. As such, we drop and re-create our tables fairly often to make sure that our table creation scripts work as expected whenever we make a…
Eli Courtwright
  • 186,300
  • 67
  • 213
  • 256
4
votes
2 answers

Grant privileges on MariaDB

I'm trying to grant privileges for user on MariaDB 10, but I've got an error 1045 [root@lw343 ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 42 Server version:…
Ivanoff
  • 103
  • 2
  • 8
4
votes
4 answers

How to create role with MySQL database

Is there a way to use CREATE ROLE with MySQL? It's possible to create roles with PostgreSQL but when I try with MySQL it returns this error message: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL…
Nadk
  • 173
  • 2
  • 3
  • 9
4
votes
1 answer

pubnub channel audit not showing grants

Recently a production app of mine began throwing exceptions due to some weird behavior with the grant/audit functions. To summarize, I can grant permissions to a channel/key combo and get a success response but when I audit the channel immediately…
Matt Z
  • 41
  • 2
4
votes
3 answers

Postgresql database superuser

I am attempting to secure a database made up of multiple schemas as follows:- -public -foo -bar -foobar I want to create a user who can access any schema for read, can create tables in bar and can inert/update/delete in foo,bar and foobar I would…
user1331131
  • 427
  • 6
  • 20
4
votes
2 answers

Column-level privileges vs. legacy application

I got a request to implement Column-level privileges, for example: GRANT UPDATE("column1") ON "TABLE" TO ROLE; But I found that client applications ( in Delphi+ODAC ) always emits SQL updates like: update TABLE set…
Juraj
  • 860
  • 4
  • 16
4
votes
3 answers

References style without line breaks

I'm writing a grant application and space is at a premium. I want LaTeX to print my references section without line breaks, so References [1] [2] [3] becomes References [1], [2], [3] I don't think the exact references style is too important…
John McDonnell
  • 1,470
  • 2
  • 18
  • 19
4
votes
1 answer

How to use GRANT with variables?

I have some troubles with GRANT and variables together in MySql. SET @username := 'user123', @pass := 'pass123'; GRANT USAGE ON *.* TO @username@'%' IDENTIFIED BY @pass; GRANT INSERT (header1, header2, headern) ON `data` TO @username@'%'; GRANT…
Pho3nixHun
  • 820
  • 2
  • 11
  • 24
4
votes
1 answer

Mysql how to revoke file

I tried the following statement in mysql terminal: revoke file on *.* to 'john'@'localhost'; But I get the error: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right…
John
  • 32,403
  • 80
  • 251
  • 422
4
votes
2 answers

grant trigger to schema not working

I need to give an user TRIGGER permission for an whole schema in mysql to import mysql workbench backup. I tried with: grant trigger ON `schemaname`.* TO `user`@`localhost` But while importing there comes the error that the user haven't the…
take
  • 2,202
  • 2
  • 19
  • 36