zoukankan      html  css  js  c++  java
  • mysql5.6安装优化实例

    [client]
    port = 3306
    socket = /tmp/mysql.sock
    [mysqld]
    log-bin = /data/mysql/bin/mysqlbinlog
    server-id = 1

    log-bin-trust-function-creators = 1

    #binlog-do-db = ProjectM

    #binlog-ignore-db = mysql
    server-id = 1001
    #binlog-do-db = ProjectM
    #binlog-ignore-db = mysql
    binlog_format = "MIXED"
    bind-address = 0.0.0.0
    port = 3306
    tadir = /data/mysql
    basedir = /usr/local/mysql
    socket = /tmp/mysql.sock
    default-storage-engine = INNODB
    character-set-server = utf8
    back_log = 500
    slow-query-log = on
    slow-query-log-file = /data/mysql/centos-slow.log
    long_query_time = 0.5
    max_connections = 512
    max_connect_errors = 102400
    max_allowed_packet = 16M
    query_cache_type = 1
    query_cache_size = 32M
    query_cache_limit = 1M
    max_heap_table_size = 64M
    sort_buffer_size = 8M
    join_buffer_size = 8M
    thread_cache_size = 100
    thread_concurrency = 8
    thread_stack = 192K
    ft_min_word_len = 4
    tmp_table_size = 64M
    binlog_cache_size = 1M
    long_query_time = 100
    key_buffer_size = 32M
    myisam_repair_threads= 1
    myisam_recover
    wait_timeout = 28800
    interactive_timeout = 28800
    skip-name-resolve
    sql-mode="NO_ENGINE_SUBSTITUTION"
    transaction_isolation = REPEATABLE-READ
    innodb_buffer_pool_size = 1G
    innodb_lock_wait_timeout = 120
    "/etc/my.cnf" 82L, 2304C written
    [root@node1 data]# service mysql restart
    ERROR! MySQL server PID file could not be found!
    Starting MySQL.. SUCCESS!
    [root@node1 data]# vim /etc/my.cnf
    [client]
    port = 3306
    socket = /tmp/mysql.sock
    [mysqld]
    log-bin = /data/mysql/bin/mysqlbinlog
    server-id = 1001
    #binlog-do-db = ProjectM
    #binlog-ignore-db = mysql
    binlog_format = "MIXED"
    bind-address = 0.0.0.0
    port = 3306
    datadir = /data/mysql
    basedir = /usr/local/mysql
    socket = /tmp/mysql.sock
    default-storage-engine = INNODB
    character-set-server = utf8
    back_log = 500
    slow-query-log = on
    slow-query-log-file = /data/mysql/centos-slow.log
    long_query_time = 0.5
    max_connections = 512
    max_connect_errors = 102400
    max_allowed_packet = 16M
    query_cache_type = 1
    query_cache_size = 32M
    query_cache_limit = 1M
    max_heap_table_size = 64M
    sort_buffer_size = 8M
    join_buffer_size = 8M
    thread_cache_size = 100
    thread_concurrency = 8
    thread_stack = 192K
    ft_min_word_len = 4
    tmp_table_size = 64M
    binlog_cache_size = 1M
    long_query_time = 100
    key_buffer_size = 32M
    myisam_repair_threads= 1
    myisam_recover
    wait_timeout = 28800
    interactive_timeout = 28800
    skip-name-resolve
    sql-mode="NO_ENGINE_SUBSTITUTION"
    transaction_isolation = REPEATABLE-READ
    innodb_buffer_pool_size = 1G
    innodb_lock_wait_timeout = 120
    innodb_thread_concurrency = 16
    innodb_file_io_threads = 4
    innodb_mirrored_log_groups = 1
    innodb_flush_method = O_DIRECT
    innodb_max_dirty_pages_pct = 90
    innodb_log_file_size = 256M
    innodb_log_buffer_size = 8M
    innodb_log_files_in_group = 4
    innodb_flush_log_at_trx_commit = 0
    innodb_additional_mem_pool_size = 16M
    innodb_data_file_path = ibdata1:10M:autoextend:max:400M
    innodb_file_per_table = 1
    [mysqldump]
    quick
    max_allowed_packet = 16M
    [mysql]
    pager = more
    no-auto-rehash
    prompt = '[u@h] (d) R:m> '
    [isamchk]
    key_buffer = 64M
    sort_buffer = 64M
    read_buffer = 8M
    write_buffer= 8M
    [myisamchk]
    key_buffer = 64M
    sort_buffer = 64M
    read_buffer = 8M
    write_buffer= 8M
    [mysqlhotcopy]
    interactive-timeout
    [mysqld_safe]
    open-files-limit= 65535
    user = mysql
    log-error = /data/mysql/data/centos.err
    pid-file = /data/mysql/data/centos.pid

  • 相关阅读:
    cocos2d-x quick 学习 二 Hello world
    cocos2d-x quick 学习 一 环境
    给自己
    最近遇到问题
    lua 基础 1
    lua 学习 (一 )Mac搭建lua环境和ide
    VueDay1
    Git的简单使用
    web常用第三方接口
    2.node基础知识笔记
  • 原文地址:https://www.cnblogs.com/cheyunhua/p/7851432.html
Copyright © 2011-2022 走看看