skip database creation - but do create tables? #46461
Unanswered
arjanhijstek-ch
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi - for the ClickHousde exporter (maybe for any target database)
the GRANT
create database
is needed for the user connecting.
This is of course not secure and unwanted!
Typically a DBA would create that database and give all permisisons within that database to the connecting user.
Now you can set:
create_schema = false
but this will NOT create the tables
With
create_schema = true
it will TRY to create that database ( create / if not exists ) - if ok tables are created.
But after proper creation, revoking CREATE DATABASE is not working as with a new startup
of the exported again a create / if not exists is executed - which is not allowed.
I was hoping for a setting like
create_database = false
but that doesn't exist.
Clause/OpenAI are not helpful - am I overlooking something - or would this be a FR?
SOLVED:
GRANT CREATE TABLE, INSERT, SELECT , CREATE DATABASE ON OTel_basic.* TO otuser;
Note the OTel_basic.*
A
SHOW GRANTS FOR otuser;
gives
GRANT SELECT, INSERT, CREATE DATABASE, CREATE TABLE ON OTel_basic.* TO otuser
A create database if exists OTel_basic
magically works.
Beta Was this translation helpful? Give feedback.
All reactions