- changed status to closed
Grant user privileges
Issue #3326
closed
Exists the possibility to use SQLAlchemy to create user and grant privilege on the DB?
Comments (3)
-
repo owner -
reporter it's independent by the db server? :)
-
repo owner no. the differences in GRANT across databases are dramatically different not just in syntax but in semantics. For example, if you did a PG GRANT for a username, that won't work at all on MySQL - you need a hostname on MySQL as well. it's entirely not worth it at all to build such an API, it would be extremely complex and nobody would be using it, as it's more about configuration of the database itself.
- Log in to comment
absolutely. Easiest is to emit the desired GRANT statements using statement execution:
if you want automatic GRANTs which can also be conditional based on backends, see the DDL system.