• windows7+docker+mysql5.6配置


    1、同上篇,先映射本地磁盘到虚拟机

    本地创建mysql目录

    mysql56目录结构:

    conf中添加 my.cnf内容:

    [mysqld]
    pid-file = /var/run/mysqld/mysqld.pid
    socket = /var/run/mysqld/mysqld.sock
    datadir = /var/lib/mysql
    symbolic-links=0
    character-set-server = utf8
    #skip-networking
    innodb_print_all_deadlocks = 1
    max_connections = 2000
    max_connect_errors = 6000
    open_files_limit = 65535
    table_open_cache = 128
    max_allowed_packet = 4M
    binlog_cache_size = 1M
    max_heap_table_size = 8M
    tmp_table_size = 16M
    read_buffer_size = 2M
    read_rnd_buffer_size = 8M
    sort_buffer_size = 8M
    join_buffer_size = 28M
    key_buffer_size = 4M
    thread_cache_size = 8
    query_cache_type = 1
    query_cache_size = 8M
    query_cache_limit = 2M
    ft_min_word_len = 4
    log-bin = mysql-bin
    server-id = 1
    binlog_format = mixed
    performance_schema = 0
    explicit_defaults_for_timestamp
    #lower_case_table_names = 1
    interactive_timeout = 28800
    wait_timeout = 28800
    # Recommended in standard MySQL setup
    sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,STRICT_TRANS_TABLES
    [mysqldump]
    quick
    max_allowed_packet = 16M
    [myisamchk]
    key_buffer_size = 8M
    sort_buffer_size = 8M
    read_buffer = 4M
    write_buffer = 4M
    

    2、

    docker pull mysql:5.6

    3、

    docker run -p 3306:3306 --name mysql56 -v /e/docker/mysql56/conf:/etc/mysql/conf.d -v /e/docker/mysql56/logs:/logs -v /e/docker/mysql56/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.6 --innodb-flush-method=O_DSYNC --innodb-use-native-aio=0

     注意:红色字体 在windows挂载虚拟盘的时候必须设置,否则会报

  • 相关阅读:
    python 展开嵌套列表
    python对字典排序
    CentOS7 Network Setting
    华为交换机Stelnet ssh/rsa验证模式下16进制公钥生成方法
    CentOS7 DHCP自动获取IP地址
    拔掉网线才能登陆域
    Exchange日志清理
    Exchange日志
    EMS邮箱数据库常用命令(二)
    EMS邮箱数据库常用命令(一)
  • 原文地址:https://www.cnblogs.com/winstonsias/p/11212553.html
Copyright © 2020-2023  润新知