zoukankan      html  css  js  c++  java
  • mysql3

    [root@localhost 3306]# vim my.cnf

    [client]
    port = 3306
    socket = /data/mysqld/3306/tmp/mysql.sock
    default-character-set = utf8mb4

    [mysql]
    default-character-set = utf8mb4

    [mysqld]
    server_id = 2207
    user = mysql
    port = 3306
    #mysqlx_port = 33070
    datadir = /data/mysqld/3306/data
    socket = /data/mysqld/3306/tmp/mysql.sock
    #mysqlx_socket = /data/mysqld/3306/mysqlx.sock
    pid-file = /data/mysqld/3306/tmp/mysql.pid
    log-error = /data/mysqld/3306/log/zhongtai_3306_error.log
    #relay-log = /data/mysqld/3306/relaylog
    #relay-log-index = /data/mysqld/3306/relaylog.index
    default-storage-engine = Innodb
    innodb_file_per_table = 1
    long_query_time = 1
    slow-query-log = on
    slow_query_log_file = /data/mysqld/3306/log/zhongtai_3306_slow.log
    log_slow_admin_statements
    lower_case_table_names=1
    log_timestamps=SYSTEM
    group_concat_max_len = 102400
    default_authentication_plugin=mysql_native_password

    #charset
    character-set-server = utf8mb4
    collation-server = utf8mb4_general_ci
    character-set-client-handshake = FALSE
    init_connect='SET NAMES utf8mb4'
    open_files_limit = 65535
    sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
    #参考:短时间内最大连接
    back_log = 1024
    #binlog
    sync_binlog = 1
    bulk_insert_buffer_size = 64M
    binlog_cache_size = 4M
    max_binlog_cache_size = 256M
    max_binlog_size = 256M
    #binlog_expire_logs_seconds= 259200
    binlog_expire_logs_seconds= 7200
    log_bin_trust_function_creators=1

    binlog_format=ROW
    log-bin = /data/mysqld/3306/binlog/3306-binlog

    #buffer
    join_buffer_size = 256K
    sort_buffer_size = 256K
    read_rnd_buffer_size = 256K
    ##innodb
    #innodb Dynamic=NO
    innodb_buffer_pool_instances = 8
    innodb_read_io_threads = 8
    innodb_write_io_threads = 4
    #innodb_data_file_path = ibdata1:512M:autoextend
    innodb_data_file_path = ibdata1:12M;ibdata2:100M;ibdata3:100M;ibdata4:100M:autoextend
    innodb_buffer_pool_size = 2048M
    innodb_flush_log_at_trx_commit = 2
    innodb_max_dirty_pages_pct = 50
    innodb_buffer_pool_load_at_startup=1
    innodb_buffer_pool_dump_at_shutdown=1
    innodb_print_all_deadlocks = 1
    innodb_log_file_size = 256M
    innodb_log_buffer_size = 32M
    innodb_log_files_in_group = 3
    innodb_io_capacity = 1000
    #数据刷新方式
    innodb_flush_method = O_DIRECT
    #单个连接所分配的内存大小
    innodb_sort_buffer_size = 1M
    transaction_isolation=read-committed
    #thread
    thread_cache_size = 256
    #connections
    max_connections = 2048
    max_connect_errors = 10240
    #跳过反向解析
    skip-name-resolve = 1
    explicit_defaults_for_timestamp = TRUE
    interactive_timeout = 600
    wait_timeout = 600

    ##replication
    #replicate_wild_ignore_table=mysql.%
    #replicate_wild_ignore_table=sys.%
    #replicate_wild_ignore_table=information_schema.%
    #replicate_wild_ignore_table=performance_schema.%
    master_info_repository=TABLE
    relay_log_info_repository=TABLE
    relay_log_recovery=ON
    log_slave_updates=1

    #plugin_dir=/usr/local/mysql3307/lib/plugin
    #plugin_load = "rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so"
    #rpl_semi_sync_master_enabled=1
    #rpl_semi_sync_slave_enabled=1

    ###slave parallel replication####
    #slave_parallel_type = LOGICAL_CLOCK
    #slave_parallel_workers = 4
    #slave_preserve_commit_order = ON

    要有多努力才能对得起奔波的脚步和身上的期望
  • 相关阅读:
    java抽象类怎么实例化了及C++中抽象类的构造函数
    树及其遍历
    C++中类的多态与虚函数的使用
    C++中#if #ifdef 的作用
    用链表实现两大数相乘
    C++中的链表类的设计
    IPicture总结
    c++标准库中,含有链表的类list
    TCP/IP、Http的区别
    C语言单链表实现19个功能完全详解
  • 原文地址:https://www.cnblogs.com/hxfcodelife/p/14690318.html
Copyright © 2011-2022 走看看