You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create users with different db access like so:
CREATE ROLE OR REPLACE uat_role;
GRANT SHOW ON uat_db TO uat_role;
GRANT CREATE ON uat_db TO uat_role;
GRANT ALTER ON uat_db TO uat_role;
GRANT DELETE ON uat_db TO uat_role;
CREATE USER OR REPLACE uat_user IDENTIFIED WITH sha256_password BY 'SecurePassPhr4se!';
GRANT uat_role to uat_user;
What are the tables/databases I need to give access to get this code to work:
var schemaProvider = _connection.DataProvider.GetSchemaProvider();
var dbSchema = schemaProvider.GetSchema(_connection);
Pluralizer pluralizer = new Pluralizer();
var formattedName = pluralizer.Pluralize(typeof(T).Name);
if (!dbSchema.Tables.Any(t => t.TableName == formattedName))
{
_connection.CreateTable<T>(tableOptions: TableOptions.CheckExistence);
}
}`
This works with the default user no issue, So I assume there are tables I'm missing.
I've tried:
GRANT SHOW ON information_schema TO uat_role;
GRANT SHOW ON system.databases TO uat_role;
GRANT SHOW ON system.columns TO uat_role;
GRANT SHOW ON system.tables TO uat_role;
GRANT SHOW ON system TO uat_role;
GRANT SHOW ON * TO uat_role;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to create users with different db access like so:
CREATE ROLE OR REPLACE uat_role;
GRANT SHOW ON uat_db TO uat_role;
GRANT CREATE ON uat_db TO uat_role;
GRANT ALTER ON uat_db TO uat_role;
GRANT DELETE ON uat_db TO uat_role;
CREATE USER OR REPLACE uat_user IDENTIFIED WITH sha256_password BY 'SecurePassPhr4se!';
GRANT uat_role to uat_user;
What are the tables/databases I need to give access to get this code to work:
` protected BaseLinqToDbRepo(LinqToDbDataConnection connection)
{
_connection = connection;
GRANT SHOW ON information_schema TO uat_role;
GRANT SHOW ON system.databases TO uat_role;
GRANT SHOW ON system.columns TO uat_role;
GRANT SHOW ON system.tables TO uat_role;
GRANT SHOW ON system TO uat_role;
GRANT SHOW ON * TO uat_role;
Beta Was this translation helpful? Give feedback.
All reactions