database-permissions

What GRANT USAGE ON SCHEMA exactly do?

冷暖自知 提交于 2019-11-28 13:56:22
问题 I'm trying to create for the first time a Postgres database, so this is probably a stupid question. 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 execute GRANT some_or_all_privileges ON ALL TABLES IN SCHEMA schema TO role; is there any need to execute also GRANT USAGE ON SCHEMA schema TO role; ? From documentation: USAGE: For schemas, allows access to objects contained in the specified schema (assuming

no pg_hba.conf entry for host

一个人想着一个人 提交于 2019-11-28 07:07:52
I get following error when I try to connect using DBI DBI connect('database=chaosLRdb;host=192.168.0.1;port=5433','postgres',...) failed: FATAL: no pg_hba.conf entry for host "192.168.0.1", user "postgres", database "chaosLRdb", SSL off Here is my pg_hba.conf file: # "local" is for Unix domain socket connections only local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 host all postgres 127.0.0.1/32 trust host all postgres 192.168.0.1/32 trust host all all 192.168.0.1/32 trust host all all 192.168.0.1/128 trust host all

The error “Login failed for user 'NT AUTHORITY\\IUSR'” in ASP.NET and SQL Server 2008

天涯浪子 提交于 2019-11-28 00:43:43
My ASP.NET v3.5 web application is throwing the following exception when it attempts to open a connection to a SQL Server 2008 database: System.Data.SqlClient.SqlException: Cannot open database "MyDbName" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\IUSR'. The thing is, I've added NT AUTHORITY\IUSR to the the server's list of logins, and to the database's list of users. For the server, I've granted the user the Public role, and for the database I've granted db_datareader permissions. I've also granted the same for NT AUTHORITY\NETWORK SERVICE , which is the

PostgreSQL: Is it better to use multiple databases with one schema each, or one database with multiple schemas?

£可爱£侵袭症+ 提交于 2019-11-27 10:02:20
After this comment to one of my question, I'm thinking if it is better using one database with X schemas or vice versa. My situation: I'm developing a web application where, when people register, I create (actually) a database (no, it's not a social network: everyone must have access to his own data and never see the data of the other user). That's the way I used for the previous version of my application (that is still running on MySQL): through the Plesk API, for every registration, I do: Create a database user with limited privileges; Create a database that can be accessed just by the

The error “Login failed for user 'NT AUTHORITY\IUSR'” in ASP.NET and SQL Server 2008

故事扮演 提交于 2019-11-27 04:45:25
问题 My ASP.NET v3.5 web application is throwing the following exception when it attempts to open a connection to a SQL Server 2008 database: System.Data.SqlClient.SqlException: Cannot open database "MyDbName" requested by the login. The login failed. Login failed for user 'NT AUTHORITY\IUSR'. The thing is, I've added NT AUTHORITY\IUSR to the the server's list of logins, and to the database's list of users. For the server, I've granted the user the Public role, and for the database I've granted db

Grant a user permission to only view a mysql view

不打扰是莪最后的温柔 提交于 2019-11-27 02:04:36
问题 The below question pertains to MySQL 5.1.44 Let's say I have a table with records inserted by different users of my application. How can I give a specific user access to only see his/her records in that table? I've thought about creating a VIEW with his/her records, but I don't know how to create a mysql user that can only see that VIEW . So, is it possible to create a mysql-user that only has access to a single VIEW ? can this user also be made so they read-only access to that VIEW ? Thanks!

no pg_hba.conf entry for host

て烟熏妆下的殇ゞ 提交于 2019-11-27 01:32:08
问题 I get following error when I try to connect using DBI DBI connect('database=chaosLRdb;host=192.168.0.1;port=5433','postgres',...) failed: FATAL: no pg_hba.conf entry for host "192.168.0.1", user "postgres", database "chaosLRdb", SSL off Here is my pg_hba.conf file: # "local" is for Unix domain socket connections only local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 host all postgres 127.0.0.1/32 trust host all

Grant privileges on several tables with specific prefix

偶尔善良 提交于 2019-11-27 01:08:34
问题 I'm using the table prefix method for having several clients use the same database. The number of tables created per client will be ~55. Instead of doing all of the granting by manually listing out the tables, can I do something like the following? GRANT SELECT,INSERT,UPDATE,DELETE ON database.prefix_* TO 'username'@'localhost' IDENTIFIED BY 'password'; 回答1: Advance Note: This is not my answer. I found it at http://lists.mysql.com/mysql/202610 and have copied and pasted for simplicity credit

PostgreSQL: Is it better to use multiple databases with one schema each, or one database with multiple schemas?

不羁岁月 提交于 2019-11-26 14:59:33
问题 After this comment to one of my question, I'm thinking if it is better using one database with X schemas or vice versa. My situation: I'm developing a web application where, when people register, I create (actually) a database (no, it's not a social network: everyone must have access to his own data and never see the data of the other user). That's the way I used for the previous version of my application (that is still running on MySQL): through the Plesk API, for every registration, I do: