ClickHouse
跳转到导航
跳转到搜索
ClickHouse是一个OLAP数据库。
安装
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/clickhouse-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8919F6BD2B48D754; sudo chmod a+r /usr/share/keyrings/clickhouse-keyring.gpg; echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" | sudo tee /etc/apt/sources.list.d/clickhouse.list; sudo apt update; sudo apt install clickhouse-client clickhouse-server
启动
预设是不会启动的,需要手动启动:
sudo service clickhouse-server
如果希望开机自动跑起来的话需要设定:
sudo systemctl enable clickhouse-server
使用
透过clickhouse-client
连上:
clickhouse-client --password
或是MySQL协定:
mysql --protocol tcp -u default -p -P 9004
或是PostgreSQL协定,但有可能会需要额外设定[1]:
psql -p 9005 -h 127.0.0.1 -U default default
参考文献
- ↑ I can not connect via postgres interface #28159. [2022-07-15] (English).
外部链接
- 官方网站 (英文)
- ClickHouse的GitHub (英文)