「ClickHouse」:修訂間差異
跳至導覽
跳至搜尋
(未顯示同一使用者於中間所作的 2 次修訂) | |||
第4行: | 第4行: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo | 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 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
第34行: | 第34行: | ||
mysql --protocol tcp -u default -p -P 9004 | mysql --protocol tcp -u default -p -P 9004 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
或是PostgreSQL協定,但有可能會需要額外設定<ref>{{Cite web |url=https://github.com/ClickHouse/ClickHouse/issues/28159 |title=I can not connect via postgres interface #28159 |language=en |accessdate=2022-07-15}}</ref>: | |||
<syntaxhighlight lang="bash"> | |||
psql -p 9005 -h 127.0.0.1 -U default default | |||
</syntaxhighlight> | |||
== 參考文獻 == | |||
{{Reflist|2}} | |||
== 外部連結 == | == 外部連結 == |
於 2023年10月11日 (三) 09:02 的最新修訂
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 (英文)