Questions tagged [database-permissions]

238 questions
3
votes
2 answers

Granting mysql access rights to all machines on subnet

I have a mysql instance (and schema) running on windows that I can access via a connection string based on localhost as the server. now I want to be able to access this db from another machine on the same subnet. If possible I would like to use a…
epeleg
  • 10,347
  • 17
  • 101
  • 151
3
votes
2 answers

MySQL/MariaDB: What is the difference between 'GRANT ... IDENTIFIED BY' vs 'CREATE USER' and then 'GRANT'?

When setting up a DB I normally create a user with: CREATE USER myuser@localhost IDENTIFIED BY 'pa$$w0rd'; and then give the user some permissions on a DB: GRANT SELECT, INSERT, UPDATE ON dbname.* TO 'myuser'@'localhost' IDENTIFIED BY…
ruhnet
  • 651
  • 1
  • 7
  • 14
3
votes
3 answers

Hibernate: Is there a way to programatically create new tables that resemble an existing one?

I have a web app that have many tables (each represents a POJO). I wrote mapping files for each class and then use Hibernate's SchemaExport to generate the tables in my database. Now I want to create 2 additional tables for each existing table that…
tomato
  • 5,644
  • 13
  • 43
  • 48
3
votes
1 answer

Superuser nologin roles?

In searching for examples of ALTER and GRANT commands I notice there are times where superuser is granted, but login is not. Moreover, it turns out that if you GRANT SELECT privileges to a role but not LOGIN, they can't execute select queries…
jsstuball
  • 4,104
  • 7
  • 33
  • 63
3
votes
1 answer

Create user with grant privileges on only one database

I want to grant read/write privileges to new user only to one database, so he can't access other databases. After I created new user with: sudo -u postgres createuser What privileges this user get? Is this all I need: GRANT ALL…
volimfritule
  • 47
  • 1
  • 6
3
votes
2 answers

Cannot access foreign table using Postgres FDW

I had a foreign table set up in Postgres 10. The role "role1" has been granted usage on the foreign server (fs) that was set up using the postgres superuser. I imported the table using the import schema command: IMPORT FOREIGN SCHEMA f_schema LIMIT…
3
votes
1 answer

SQl server 2008 permission and encryption

i have made columns in some of the tables encrypted in sql server 2008. Now as i am a db owner i have the access to encode and decode the data using the symmetric key and certificate. But some other users have only currently datareader and…
paranjai
  • 531
  • 2
  • 5
  • 26
3
votes
1 answer

SQL Server 2012 grant access to sys.dm_os_ring_buffers from ASP.net

I want to access a system table from within my ASP.Net application. Currently the application connects to the database StudentPortal with a user account of: WebAppClient. When I try to run the following query logged in as WebAppClient I get the…
Chris Kooken
  • 32,730
  • 15
  • 85
  • 123
3
votes
2 answers

can a SQL Server stored proc execute with higher permission than its caller?

Our SQL Server database has a reporting feature that allows callers to read, but not write, any table, because the user (or, more precise, the connection opened by the web app that's operating on behalf of the user) has only datareader permissions…
Justin Grant
  • 44,807
  • 15
  • 124
  • 208
3
votes
2 answers

ACL modeling - how to manage "hierarchy" of an Access control list?

I'm still working in my ACL project, and I'd like some ideas for the following problem: I'm using MySQL to store my users, roles and permissions. At first, I created a field "parent_id" in my TABLE Roles, and I was trying to manage the permissions…
sergioviniciuss
  • 4,596
  • 3
  • 36
  • 50
2
votes
3 answers

Table permissions when a low permission user executes a sproc

I have a sproc (call it client.UpdateClient) that is executed by a SQL User (call it MyWCFServicesUser. MyWCFServicesUser has datareader and datawriter permissions on the database. It also has execute permissions on the sproc (but no other…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
2
votes
1 answer

Permission Issue for SQL Server 2008 Stored Procedure Using Encryption

I have arranged a database with three schemas. Under Database User, I have ticked the three schemas as Owned Schemas of the user I'm connecting via (thought it was a good idea at the time). However, this seems to be disallowing me to add the db user…
ComfortablyNumb
  • 1,448
  • 10
  • 37
  • 64
2
votes
2 answers

SQL Server 2008 Grant Select Permission

I am having trouble adding a user to a test database I set up on my local machine. I have added the user fine but the user does not have permission to SELECT (Or anything else for that matter) on the database. I have tried gone the the permission…
OhWhen
  • 91
  • 1
  • 2
  • 5
2
votes
1 answer

AWS RDS: how to grant SELECT PG_BUFFERCACHE to non-aws-superuser

After installing the https://www.postgresql.org/docs/9.1/pgbuffercache.html extention I want to have access to the pg_buffercache view from other non-super user. GRANT EXECUTE ON FUNCTION pg_buffercache_pages() TO test_monitoring; GRANT SELECT ON…
2
votes
2 answers

Azure PostgreSQL as service - Create separate user per database gives "Permission denied"

My application is a multi-tenant one. I am creating a single database per tenant/user. So far, I was creating all the databases with the following command from c# code. CREATE DATABASE @userDBName WITH OWNER = @dbOwner ENCODING = 'UTF8'; This way I…
puneet
  • 492
  • 1
  • 8
  • 25