客户端链接使用 clickhouse-client#指定端口连接clickhouse-client --port 9020
修改端口与远程连接 ClickHouse安装后,默认client连接端口是9000默认配置文件是只读, 首先需要修改配置文件权限:chmod u+w /etc/clickhouse-server/config.xml <!-- Port for interaction by native protocol with: - clickhouse-client and other native ClickHouse tools (clickhouse-benchmark, clickhouse-copier); - clickhouse-server with other clickhouse-servers for distributed query processing; - ClickHouse drivers and applications supporting native protocol (this protocol is also informally called as "the TCP protocol"); See also 'tcp_port_secure' for secure connections. --> <tcp_port>9020</tcp_port> tcp_port 端口进行修改
远程连接:找到<listen_host>::</listen_host>的配置项,取消注释,这样就同时支持IPv4和IPv6了。也可以选择取消注释<listen_host>0.0.0.0</listen_host>,就仅支持IPv4,不允许IPv6。
|