ClickHouse启动报错 Run under ‘sudo -u clickhouse‘

问题:

使用命令

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 ] {} 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

参考资料1

参考资料2

你可能感兴趣的:(ClickHouse,ClickHouse)