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

MySql grant user permission

I want to create a new user in MySql. I do not want that new user to do much with my existing databases [I just want to grant Select privilege to him], but he can do anything and everything with a new database which he creates. Firstly, is there a…
Anuj
  • 1,203
  • 3
  • 13
  • 20
3
votes
1 answer

How to grant usage on generator syntax

I'm usually not the one working with Firebird language, but I have to fix access to generators in order to continue working. There is one line in my script: set generator order_gen to 0 that doesn't work anymore. I'm trying: GRANT USAGE ON GENERATOR…
3
votes
1 answer

Snowflake Role based Access control hierarchy

I am looking for your suggestions on Snowflake Role based Access control hierarchy which I created for a Snowflake data warehousing project. Basically, we need to maintain different client data with different databases. This database creation…
3
votes
1 answer

GRANT support in MS ACCESS

ALL, Does GRANT-ing permissions supported in MS ACCESS? I am connecting to accdb with ODBC driver from C++ app and trying to issue a GRANT command, but getting an error saying expecting DELETE, INSERT, PROCEDURE, SELECT or UPDATE. It is on Windows…
Igor
  • 5,620
  • 11
  • 51
  • 103
3
votes
2 answers

Create readonly user on all 1000 postgres databases and schema's

Using Vault I'm trying to create an on-demand temporary read-only users in a Postgres 11.8 instance. I will have: 1000+ databases (one per customer aka tenant) Each database has a public and reporting schema. So I'm trying to find a way to grant…
Jesse
  • 879
  • 1
  • 12
  • 26
3
votes
1 answer

Granting privilege to existing user gives "you are not allowed to create a user with grant" even though the user already exists

I am logged in as root user and i just reinstalled the mysql server. login_manager isn't created as is shown when i execute SELECT * FROM mysql.user;. I now execute CREATE USER 'login_manager'@'localhost' IDENTIFIED BY 'login_manager'; and when i…
Deedit
  • 69
  • 1
  • 6
3
votes
1 answer

Trying to setup wordpress on ubuntu and want to grant privileges in mysql

Trying to run this: mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER -> ON wordpress.* -> TO wordpress@localhost -> IDENTIFIED BY 'root'; But got an error: ERROR 1064 (42000): You have an error in your SQL syntax; check the…
vuld0
  • 184
  • 1
  • 1
  • 9
3
votes
1 answer

How to grant permissions in Postgres on tables that start with parcel?

GRANT UPDATE ON (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE 'parcel%') TO police;
gulls92
  • 33
  • 3
3
votes
4 answers

Grant access to subset of table to user on PostgreSQL

I know that I can use views to grant access to a subset of attributes in a table. But how can I grant access to particular tuples only? Say I have a table of registered students, a username attribute and then some other like degree_status, how do I…
matthewbpt
  • 33
  • 4
3
votes
1 answer

How to manage table ownership in MySQL

Team, Could you guide me : how to find out the table owner in mysql ? how to alter the table ownership to another user in mysql ?
user3258784
  • 1,987
  • 6
  • 24
  • 28
3
votes
1 answer

MySQL user and host precedence

I have two users, let's call them foo on two different databases: Database_A: mysql> select user,host from user where user = 'foo'; +-----------+-----------+ | user | host | +-----------+-----------+ | foo | % | | foo | 10.% …
ryekayo
  • 2,341
  • 3
  • 23
  • 51
3
votes
1 answer

Oracle: Grant privileges to multiple schema in one line

I want to write one line in oracle so that I can grant select privilege on a table to multiple schema at once. Here's what I have but I get a syntax error: GRANT SELECT ON OWNER.TABLE_NAME to (select distinct owner from dba_objects where owner like…
3
votes
2 answers

MySQL Error: #1142 - TRIGGER command denied

I need that my MySQL database makes a sum of some values in a specific coloumn. To do that I used trigger statement but MySQL gave me an error: MySQL Error: #1142 - TRIGGER comand denied to user 'XXXXXX' for table wp_wpdatatable_8 the Trigger is…
Pasquale
  • 31
  • 1
  • 2
  • 4
3
votes
2 answers

How to grant Database scope credentials to users in Azure SQL Database

I've Azure SQL Database, where we will bulk load the CSV files from azure blob to SQL table. So far we can easily able to do that with the admin credentials. The below query is working under admin credentials but not working for normal user…
Jayendran
  • 9,638
  • 8
  • 60
  • 103
3
votes
1 answer

mariadb grant table in docker container: hostname and ip

I am running a mariadb instance in a docker container. It is connected to a custom bridge network. Let's call it db_net here. Now I want to connect to mariadb from another container connected to the same network. I can ping the mariadb container…
user52366
  • 1,035
  • 1
  • 10
  • 21