docker 版本clickhouse支持远程连接 加上密码

首先安装docker
安装网址:https://www.runoob.com/docker/centos-docker-install.html
使用官方安装脚本自动安装
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
在这里插入图片描述
拉取clickhouse镜像
docker pull clickhouse/clickhouse-server
在这里插入图片描述

设置外部用户名密码和远程文件
mkdir -p /usr/local/clickhouse/conf
上传
config.xml
users.xml
docker 版本clickhouse支持远程连接 加上密码_第1张图片
用户名default 密码 Mysql_123456

启动容器
docker run -itd --name some-clickhouse-server -p 8123:8123 -p 9009:9009 -p 9000:9000 --ulimit nofile=262144:262144 --volume=/usr/local/clickhouse/conf/config.xml:/etc/clickhouse-server/config.xml --volume=/usr/local/clickhouse/conf/users.xml:/etc/clickhouse-server/users.xml yandex/clickhouse-server
在这里插入图片描述

在这里插入图片描述
使用dbeaver远程连接
docker 版本clickhouse支持远程连接 加上密码_第2张图片
docker 版本clickhouse支持远程连接 加上密码_第3张图片

补充
config.xml




    
        
        trace
        /var/log/clickhouse-server/clickhouse-server.log
        /var/log/clickhouse-server/clickhouse-server.err.log
        
        1000M
        10
         

        
        

        
        
    

    
    

    
    8123

    
    9000

    
    9004

    
    

    
    

    
    

    
    

    
    9009

    
    

    
    

    
    

    
    :: 

    
    

    
    

    
    

    
    

    

    4096

    
    3

    
    
    
        false

        
        /path/to/ssl_cert_file
        /path/to/ssl_key_file

        
        false

        
        /path/to/ssl_ca_cert_file

        
        deflate

        
        medium

        
        -1
        -1

        
        false
    

    
    
         
            
            /etc/clickhouse-server/server.crt
            /etc/clickhouse-server/server.key
            
            /etc/clickhouse-server/dhparam.pem
            none
            true
            true
            sslv2,sslv3
            true
        

         
            true
            true
            sslv2,sslv3
            true
            
            
                
                RejectCertificateHandler
            
        
    

    
    

    
    100

    
    0

    

    10000

    
    0.9

    
    4194304

    
    0

    
    

    
    8589934592

    
    5368709120


    
    1000


    
    /var/lib/clickhouse/

    
    /var/lib/clickhouse/tmp/

    
    

    
    /var/lib/clickhouse/user_files/

    
    
        
    

    

    
    
        
            
            users.xml
        
        
            
            /var/lib/clickhouse/access/
        

        
    

    
    default

    
    

    
    

    
    

    
    default

    
    

    
    

    
    true

    
    false

    
    
        
        
            
            

            
                
                
                
                
                
                    localhost
                    9000
                    
                    
                
            
        
        
             
                 
                     localhost
                     9000
                 
             
             
                 
                     localhost
                     9000
                 
             
        
        
            
                
                    127.0.0.1
                    9000
                
            
            
                
                    127.0.0.2
                    9000
                
            
        
        
            
                true
                
                    127.0.0.1
                    9000
                
            
            
                true
                
                    127.0.0.2
                    9000
                
            
        
        
            
                
                    localhost
                    9440
                    1
                
            
        
        
            
                
                    localhost
                    9000
                
            
            
                
                    localhost
                    1
                
            
        
    

    
    
        

        
    

    

    

    

    
    


    
    3600


    
    3600

    
    60

    
    
    

    
    
    

    
    
        
        system
        query_log
toYYYYMM(event_date) 7500
system trace_log
toYYYYMM(event_date) 7500
system query_thread_log
toYYYYMM(event_date) 7500
system metric_log
7500 1000
system asynchronous_metric_log
60000
engine MergeTree partition by toYYYYMM(finish_date) order by (finish_date, finish_time_us, trace_id) system opentelemetry_span_log
7500
system crash_log
1000
*_dictionary.xml /clickhouse/task_queue/ddl click_cost any 0 3600 86400 60 max 0 60 3600 300 86400 3600 /var/lib/clickhouse/format_schemas/ hide encrypt/decrypt arguments ((?:aes_)?(?:encrypt|decrypt)(?:_mysql)?)\s*\(\s*(?:'(?:\\'|.)+'|.*?)\s*\) \1(???) false false https://[email protected]/5226277

users.xml



    
    
        
        
            
            10000000000

            
            random
        

        
        
            1
        
    

    
    
        
        
            
            Mysql_123456

            
            
                ::/0
            

            
            default

            
            default

            
            
        
    

    
    
        
        
            
            
                
                3600

                
                0
                0
                0
                0
                0
            
        
    


你可能感兴趣的:(docker,容器,运维)