728 questions
1
vote
1
answer
69
views
Unallowed GRANT does not raise an exception and doesn't grant the privilege either, if user already has other privileges on the object
I have a regression test for a PostgreSQL database that checks to make sure a particular user cannot self-assign additional privileges to a particular schema. I do this by logging in as the user "...
770
votes
10
answers
994k
views
Create new user in MySQL and give it full access to one database
I want to create a new user in MySQL and give it full access only to one database, say dbTest that I create with a command like create database dbTest;. What would be the MySQL commands to do that?
369
votes
10
answers
857k
views
PostgreSQL: Give all permissions to a user on a PostgreSQL database
I would like to give a user all the permissions on a database without making it an admin.
The reason why I want to do that is that at the moment DEV and PROD are different DBs on the same cluster so I ...
1
vote
1
answer
58
views
Prevent user from manipulating subset of columns by RLS on view with no RLS on table
I want to use use VIEWS for column security. db<>fiddle
create table users(user_id, first_name, create_time)as values
(1, 'Adam', 'yesterday'::timestamptz)
, (2, 'Bob' , 'today');
create ...
138
votes
11
answers
157k
views
MySQL/Amazon RDS error: "you do not have SUPER privileges..."
I'm attempting to copy my mysql database from an Amazon EC2 to an RDS:
I successfully did a mysqldump of my database into my root folder using this:
root@ip-xx-xx-xx-xx:~# mysqldump my_database -u ...
0
votes
0
answers
43
views
utPLSQL in Oracle SQL Developer: ORA-01031: insufficient privileges
I'm using utPLSQL to perform unit testing in Oracle. Here are all the privileges I granted to the user in the utPLSQL schema:
GRANT EXECUTE ON DBMS_LOCK TO utester;
GRANT CREATE SESSION TO utester;
...
256
votes
3
answers
345k
views
What does GRANT USAGE ON SCHEMA do exactly?
I'm trying to create a Postgres database for the first time.
I assigned basic read-only permissions to the DB role that must access the database from my PHP scripts, and I have a curiosity: If I ...
137
votes
7
answers
175k
views
Query grants for a table in postgres
How can I query all GRANTS granted to an object in postgres?
For example I have table "mytable":
GRANT SELECT, INSERT ON mytable TO user1
GRANT UPDATE ON mytable TO user2
I need somthing which ...
118
votes
8
answers
223k
views
How to grant remote access to MySQL for a whole subnet?
I can easily grant access to one IP using this code:
$ mysql -u root -p
Enter password:
mysql> use mysql
mysql> GRANT ALL ON *.* to root@'192.168.1.4' IDENTIFIED BY 'your-root-password';...
0
votes
1
answer
52
views
No privileges when executing Oracle stored procedure
I have a problem with an Oracle stored procedure that dynamically creates some materialized views.
The procedure first drops the materialized views if there are any with the same name of the ones that ...
2
votes
1
answer
2k
views
user cannot create table on schema public Postgres 16
I have to create a table in Postgres public schema for Airflow implementation. When I create a table with airflow user I get this error
permission denied for schema public
LINE 1: CREATE TABLE public....
0
votes
1
answer
555
views
How to get Future Grants over Schema in Snowflake?
I have a use case where I need to check for FUTURE grants on an input database and schema. If FUTURE grants are found and not match with Input Role then I want to revoke them and then assign the ...
1
vote
0
answers
297
views
Why one superuser cannot use GRANT in Postgres 16
Postgres 16 has user ingmar which is marked as superuser and has create role rights:
CREATE ROLE ingmar WITH
LOGIN
SUPERUSER
INHERIT
CREATEDB
CREATEROLE
NOREPLICATION
BYPASSRLS
...
0
votes
1
answer
335
views
Cannot grant user privilege to create REFERENCES in MySQL 8
I tried to create the quartz table with a user that has privilege as below.
Privileges: [Select, Insert, Update, Delete, Create, Drop, File, Index, Alter, Show databases, Create temporary tables, Lock ...
128
votes
2
answers
273k
views
Grant all on a specific schema in the db to a group role in PostgreSQL
Using PostgreSQL 9.0, I have a group role called "staff" and would like to grant all (or certain) privileges to this role on tables in a particular schema. None of the following work
GRANT ALL ON ...
0
votes
1
answer
77
views
Grant user to create table oracle
In my oracle 23ai instance, as ADMIN user I created this user:
CREATE USER IF NOT EXISTS USER000 IDENTIFIED BY MyHardP4ssword';
Then I granted him some privileges:
GRANT RESOURCE, CONNECT, CREATE ...
2
votes
1
answer
3k
views
Is there any way to grant RDSADMIN USER privileges to a user?
GRANT APPLICATION_PASSWORD_ADMIN,BACKUP_ADMIN,FLUSH_OPTIMIZER_COSTS,FLUSH_STATUS,FLUSH_TABLES,FLUSH_USER_RESOURCES,
INNODB_REDO_LOG_ARCHIVE,PASSWORDLESS_USER_ADMIN,SHOW_ROUTINE
I want to grant these ...
30
votes
7
answers
101k
views
Can you limit access to only one table in a SQL Server database?
I'm looking to give someone access to a SQL Server database but I only really want them to have access to one table.
It's easy enough to limit someone to only access one database, but I have no idea ...
0
votes
1
answer
188
views
Views Creation Permissions without table Creation Permissions in POSTGRESQL
I have a use case where I want to create a user which should have access on select for public schema and Views Creation On public schema but not table creation User can create a new view but not table
...
2
votes
1
answer
151
views
How to retrieve user access rights with FireDAC
I am using FireDAC to access a MySQL database from within Delphi.
When logging in into the database I give in the database user name, which is defined within MySQL and has certain access right.
How ...
0
votes
0
answers
182
views
supabase postgress roles error in flutter
in supabase
after creating role 'adminRole'
then granting the role to an email through
update auth.users set role = 'adminRole' where email='my email';
i checked the table and it did update.
then ...
0
votes
0
answers
55
views
Oracle Revoke Invalid Grants
I'm currently in the process of migrating a database, and dropping several schemas in the move.
The schemas I'm excluding have grants on some of the schemas that are included. Like grant update on ...
0
votes
1
answer
216
views
How to grant execution permission on procedure to ALL USERS
I need to grant all users with execution permissions to execute myprocedure
I'm using this:
grant execute on procedure myprocedure to '*'@'%%';
And I got this:
SQL Error [1410] [42000]: You are not ...
42
votes
3
answers
71k
views
`GRANT FILE ON` just one database
I want to allow LOAD DATA command for the john mysql user. So I logged into mysql terminal as root and issued the following statement:
GRANT FILE ON johndatabase.* TO 'john'@'localhost';
But I got ...
0
votes
1
answer
386
views
Oracle database link to a package saying table not found
We've created a database link from an Oracle 12.1 DB to Oracle APEX 21.2 (Oracle 19c) and have granted EXECUTE to a package and granted SELECT to all the listed tables inside the function that's used ...