Questions tagged [database-permissions]
238 questions
1
vote
3 answers
How do you store database credentials in typical CMS build on PHP?
What's the best practice to store database credentials in a CMS? Now I declare them in my Database singleton class:
$this->credentials = array("hostname"=>"hostname", "username"=>"username","password"=>"password", "database"=>"database");
But it's…

Deniss Kozlovs
- 4,761
- 2
- 28
- 35
1
vote
1 answer
Entity Framework : Relational Model help for Permissions, Users etc
Can anyone help?
I am looking to create a good relational model for managing Permissions.
I currently have a Users table, and various other tables like Customers, Suppliers.
The user needs permissions to View, Edit, Create in either Customers,…

Martin
- 23,844
- 55
- 201
- 327
1
vote
1 answer
Permission rights for SQL login accessing Database for ASP.Net Application
I always wonder what are the exact access rights and permissions I need to give to a sql login which I use from my asp.net application to access database. The application execute some stored procedures which insert, update and delete data into…

TheVillageIdiot
- 40,053
- 20
- 133
- 188
1
vote
1 answer
Django-guardian on DB with shared (non-exclusive) access
I am developing a Django app being a Web frontend to some Oracle database with another local DB keeping app's data such as Guardian permissions. The problem is that it can be modified from different places that I don't have control of.
Let's say we…

mczers
- 257
- 2
- 8
1
vote
3 answers
MySQL : How to grant "ALTER DATABASES" to a USER
A user needs to do :
ALTER DATABASE `dbname` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
...but even with a :
GRANT ALL PRIVILEGES ON dbname.* TO 'user_name'@'localhost' IDENTIFIED BY '***';
...the user is not allowed to do that.
I…

Denis BUCHER
- 310
- 4
- 16
1
vote
1 answer
In MySQL, how can I have a stored procedure query the tables from the calling database instead of the database where the stored procedure is defined
For the sake of simplification, let's say I have 2 databases with data, db_data_1 and db_data_2 which have the same set of tables and I have a 3rd database where my stored procedures are defined, say db_sp. Let's say my stored procedure is called…

Jerome Provensal
- 931
- 11
- 22
1
vote
1 answer
SQL Server revoking select
Let's suppose a user, "Bob", gets SELECT privilege from John and Bob also gets SELECT privilege from another user Joe but this time with GRANT option.
What happens if someone revokes the select privilege with cascade? Will the select privilege be…

pi012
- 13
- 2
1
vote
2 answers
Improving performance of a Specific MySQL Query
I am using an enterprise application at multiple sites that requires the use of a database. I am not a developer of the application, thus I cannot modify how the application queries the database. Presently, we are trying to migrate from MySQL to…

gschra11
- 11
- 5
1
vote
1 answer
Is there a way to inherits table which is not owned by current user
I create two users in my PostgreSQL db. let's say migration and dev.
I create a table A with user migration. Then I create table B which inherits table A as user dev, but that fails.
ERROR: must be owner of relation A
If I don't want to alter the…

yukuan
- 521
- 5
- 18
1
vote
1 answer
How to give access to a database to only specific users?
This is probably a silly question and I'm sure it's a problem with my mental model.
Ultimately I want to set privileges on a role such that any other roles in that role have CRUD access to all the current tables and automatically all of the future…

Fred
- 3,786
- 7
- 41
- 52
1
vote
1 answer
How do I set up permissions so that all developers get ALL PRIVILEGES to objects that any of the other developers create?
I want all developers to be able to work with each other's code. When one person creates a table, others should be able to query it directly without permissions needing to be granted.
I thought the way to accomplish this was to create a role…

Chris Wuestefeld
- 3,266
- 2
- 23
- 23
1
vote
6 answers
User Granted Access to Stored Procedure but Can't Run Query
I am working on a product that runs an SQL server which allows some applications to login and their logins are granted permission to run a stored procedure- AND NOTHING ELSE. The stored procedure is owned by an admin; the stored procedure takes a…

Kiril
- 39,672
- 31
- 167
- 226
1
vote
2 answers
SQL Server 2008 EF 4 - limiting database records returned using permissions?
In our database all tables are linked back to a single table. This table has a bit column to limit whether the record is displayed. Currently the records are filtered on the code side of the website.
Is there any way to set up permission so that…

Chuck
- 143
- 10
1
vote
1 answer
Drop PostgreSql DB from php
Is there any way to write DROP DATABASE [ IF EXISTS ] name from php script? Seems that I need something similar to mysql_drop_db just for Postrge.
How my $connStr in $conn = pg_connect($connStr) must look like to have rights to do this command?…

GuessWho
- 664
- 1
- 6
- 19
1
vote
1 answer
Postgres users, roles and permissions
I have recently moved hosting environments and have had to backup the old Postgres database and copied it to the new server.
On the new server, I imported the database and now I receive an error django.db.utils.ProgrammingError: permission denied…

squareborg
- 1,562
- 14
- 18