美文网首页
mysql8 docker部署

mysql8 docker部署

作者: 怀旧的艾克 | 来源:发表于2019-10-15 20:12 被阅读0次

    命令行

    docker run --name mysql-8016 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -v /root/wyp/mysql8/data:/var/lib/mysql:rw -v /root/wyp/mysql8/log:/var/log/mysql:rw -v /root/wyp/mysql8/config/my.cnf:/etc/mysql/my.cnf:rw -v /root/wyp/mysql8/mysql-files:/var/lib/mysql-files/ -d mysql:8.0.16

    my.conf

    [client]
    default-character-set=utf8mb4
    [mysql]
    default-character-set=utf8mb4
    [mysqld]
    pid-file=/var/run/mysqld/mysqld.pid
    socket=/var/run/mysqld/mysqld.sock
    datadir=/var/lib/mysql
     
    character-set-server=utf8mb4
    collation-server=utf8mb4_unicode_ci
    init_connect='SET NAMES utf8mb4'
     
    innodb_use_native_aio=0
    innodb_flush_log_at_trx_commit=0
    log_queries_not_using_indexes=0
    slow_query_log=1
     
    skip-external-locking
    skip-name-resolve
     
    symbolic-links=0
    max_allowed_packet = 16M
    max_connections=10240
    key_buffer_size=384M
    table_open_cache=512
    sort_buffer_size=2M
    read_buffer_size=2M
    read_rnd_buffer_size=8M
    myisam_sort_buffer_size=64M
    thread_cache_size=8
     
    log-bin=mysql-bin
    binlog_format=mixed
    expire_logs_days=10
    sync_binlog=0
    server-id=1
    default-authentication-plugin = mysql_native_password
     
    [mysqldump]
    quick
    max_allowed_packet=16M
     
    [myisamchk]
    key_buffer_size=128M
    sort_buffer_size=20M
    read_buffer=2M
    write_buffer=2M
     
    [mysqlhotcopy]
    interactive-timeout
    

    相关文章

      网友评论

          本文标题:mysql8 docker部署

          本文链接:https://www.haomeiwen.com/subject/dxkemctx.html