このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Using a Client to Access a ClickHouse Cluster

Updated on 2024-12-24 GMT+08:00

You can use SQL to access a cluster on an ECS. For details about how to install the client, see Installing the Client.

NOTE:

The VPC and security group of the cluster to be created must be the same as those of the ECS on the public network. Otherwise, the client cannot access the cluster.

Installing the Client

  1. Prepare a Linux ECS. For details, see Preparing an ECS.
  2. Log in to the CloudTable management console, click Help in the navigation pane on the left, and click Download Client and Client Verification File on the right of the page to download the client installation package and client verification file.
  3. Install the client and connect to the cluster.

    1. Use the SSH login tool to remotely log in to the Linux ECS through the EIP.

      For details, see Login Using an SSH Password in the Elastic Cloud Server User Guide.

    2. Go to the root directory of the SSH login tool.
      cd /
    3. Create a folder in the root directory.
      mkdir Folder name
    4. Go to the directory of the created folder.
      cd /Folder name/
    5. Place the client in the directory.
    6. Decompress the client package.
      tar  -zxf   Client package name
    7. Decompress the client verification file to the same directory as the client.
      1. Decompress the client verification file.
        cd <Path for storing the client verification file >
        tar -xzvf Client_sha256.tar.gz
      2. Obtain the client verification code.
        sha256sum ClickHouse_Client_23.3.tar.gz
      3. Check the verification code in the client verification file and compare it with the client verification code. A match indicates no tampering, while a mismatch suggests tampering.
        less ClickHouse_Client_23.3.tar.gz.sha256
    8. Load the .so file.
      sh install.sh
    9. Go to the bin directory.
      cd bin/

      Grant the 700 permission to the directory.

      chmod 700 clickhouse
    10. Connect to the ClickHouse cluster. For details about the port, see Table 1.
      Use the following command to connect to a normal cluster.
      ./clickhouse client --host Private IP address of the cluster   --port Port --user admin --password Password

      For details about the security cluster connection command. For details, see Connecting to a Security Cluster.

      ./clickhouse client --host Private IP address of the cluster --port port --user admin --password Password --secure --config-file /root/config.xml
      NOTE:
      • Private IP address of the cluster: cluster access address on the cluster details page. Replace it with the access address of the cluster you purchased.
      • Password: the password set when you purchase the cluster. If there are special characters, use backslashes (\) to escape them. If the password is enclosed in single quotation marks ('), the special characters do not need to be escaped.
      Table 1 Custom security rules

      Direction

      Action

      Port/Range

      Type

      Destination/Source Address

      Usage

      Outbound

      Allow

      All

      IPv4/IPv6

      0.0.0.0/0

      Permit in the outbound direction

      Inbound

      Allow

      8123

      Security group of the CloudTable ClickHouse cluster

      ClickHouse HTTP port number

      Allow

      9000

      ClickHouse TCP port number

      Allow

      8443

      ClickHouse HTTPS port number

      Allow

      9440

      Secure TCP security port of ClickHouse

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback