database-permissions

sql open connection in read only mode

折月煮酒 提交于 2021-01-20 21:41:22
问题 This question comes out of curiosity. I searched google for this but didn't get a clue. Suppose a user has full read/write access to MySQL database. I am wondering, is there any way (some parameter in connection string) to connect to database by the same username and password in read-only mode? I want this without changing this user's permissions because the same user might require write permission too at some other time. This would be useful (if possible) to prevent accidental modification

sql open connection in read only mode

江枫思渺然 提交于 2021-01-20 21:39:31
问题 This question comes out of curiosity. I searched google for this but didn't get a clue. Suppose a user has full read/write access to MySQL database. I am wondering, is there any way (some parameter in connection string) to connect to database by the same username and password in read-only mode? I want this without changing this user's permissions because the same user might require write permission too at some other time. This would be useful (if possible) to prevent accidental modification

Amazon Redshift Grants - New table can't be accessed even though user has grants to all tables in schema

孤街醉人 提交于 2020-02-19 08:39:30
问题 I have a bit of a funny situation in Amazon Redshift where I have a user X who has grant select on all tables in schema public, but once a new table is created, this grant doesn't seem to apply to the new table. Is this normal behaviour? If yes, how does one deal with it such that the schema level grants are maintained. Thank you. 回答1: In Redshift tables and views do not automatically inherit the permissions of their parent schema. Your newly created tables are only accessible to the user who

Amazon Redshift Grants - New table can't be accessed even though user has grants to all tables in schema

偶尔善良 提交于 2020-02-19 08:38:33
问题 I have a bit of a funny situation in Amazon Redshift where I have a user X who has grant select on all tables in schema public, but once a new table is created, this grant doesn't seem to apply to the new table. Is this normal behaviour? If yes, how does one deal with it such that the schema level grants are maintained. Thank you. 回答1: In Redshift tables and views do not automatically inherit the permissions of their parent schema. Your newly created tables are only accessible to the user who

Listing table results in “CREATE TABLE permission denied in database” ASP.NET - MVC4

♀尐吖头ヾ 提交于 2020-01-21 03:00:13
问题 I'm using ASP.NET MVC 4 - c# to connect to a live database, and list the results, however when I go to view the page it returns the following error: CREATE TABLE permission denied in database 'DatabaseName'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: CREATE TABLE permission denied in

General error: 1 Can't create/write to file errcode:2

自古美人都是妖i 提交于 2020-01-06 03:13:18
问题 I am trying to write a CSV file to /var/www/VistaMind_CMStmp and I get the error Message: SQLSTATE[HY000]: General error: 1 Can't create/write to file '/VistaMind_CMS/tmp/app_users.csv' (Errcode: 2) I tried doing chown mysql:mysql /var/www/VistaMind_CMS/tmp , but that does not work. I do not want to modify my TMPDIR var in my.cnf, which is currently set to /var/www, but instead, I want MySQL to dump a database table to /var/www/VistaMind_CMS/tmp. Please help! My code is : $file_path = $this-

ASP.Net Membership.DeleteUser

感情迁移 提交于 2019-12-31 22:25:19
问题 In testing, the user on a db i've used was a big jefe. In production, he only has Execute. When I called, Membership.DeleteUser(user) In testing, it worked. I try the same in production, and I get this: The DELETE statement conflicted with the REFERENCE constraint "FK__aspnet_Us__UserI__37703C52". The conflict occurred in database "Testing", table "dbo.aspnet_UsersInRoles", column 'UserId'. In my seargles (searches on Google), I came across this link where the dude was saying, Error: The

Why does a PostgreSQL SELECT query return different results when a schema name is specified?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 21:32:48
问题 I have a PostgreSQL database table with 4 columns - labeled column_a, column_b, etc. I want to query this table with a simple select query: select * from table_name; I get a handful of results looking like: column_a | column_b ---------+--------- 'a value'|'b_value' But when I use this query: select * from schema_name.table_name; I get the full result: column_a | column_b | column_c | column_d ---------+----------+----------+--------- 'a value'|'b value' |'c value' |'d_value' Columns c and d

Efficiently determine owner of a record in a hierarchy with MongoDB

你。 提交于 2019-12-21 08:14:46
问题 I am trying to achieve the following: Select all the records that I own, where ownership is objects I have created OR objects a user I manage has created, where user management can be in a hierarchy of users managing users Ownership is clearly straight forward and could be handled by a simple id corresponding to the owner. The hierarchy of user management has me a little stumped to perform without heavy lifting through large lists of IDs (you can obviously just find every user that is managed

PHP Access Control System

假如想象 提交于 2019-12-18 12:30:47
问题 I am part of a team creating a web application using PHP and MySQL. The application will have multiple users with different roles. The application will also be used in a geographically distributed manner. Accordingly we need to create an access control system that operates at the following two levels: Controls user permissions for specific php pages i.e. provides or denies access to specific pages (or user interface elements) based on the user's role. For example: a user may be allowed access