问题:
使用命令
clickhouse-server --config-file=/etc/clickhouse-server/config.xml
启动 ClickHouse
的时候,会报下面的错误
Effective user of the process (root) does not match the owner of the data (clickhouse)
或者
2022.01.13 00:32:46.999337 [ 3088 ] {} <Error> Application: DB::Exception: Effective user of the process (root) does not match the owner of the data (clickhouse). Run under 'sudo -u clickhouse'.
解决方式:
使用下面的命令
# 启动 ClickHouse
sudo systemctl start clickhouse-server
# 关闭 ClickHouse
sudo systemctl stop clickhouse-server
# 查看状态 ClickHouse
sudo systemctl status clickhouse-server