• zabbix proxy mysql数据库配置 摩天居士


    一、首先要指定数据库的数据目录,即将mysql数据目录放置系统最大的文件目录下,这一点很重要

    二、配置

    [mysqld]
    #datadir=/var/lib/mysql
    #socket=/var/lib/mysql/mysql.sock
    # Disabling symbolic-links is recommended to prevent assorted security risks
    symbolic-links=0
    # Settings user and group are ignored when systemd is used.
    # If you need to run mysqld under a different user or group,
    # customize your systemd unit file for mariadb according to the
    # instructions in http://fedoraproject.org/wiki/Systemd
    
    port= 3306
    socket=/app/zabbix_proxy_data/mysql/mysql.sock
    basedir=/opt/local/mysql
    datadir=/app/zabbix_proxy_data/mysql
    open_files_limit = 65535
    innodb_file_per_table=1
    innodb_buffer_pool_size=1024M
    innodb_buffer_pool_instances=6
    innodb_flush_log_at_trx_commit=1
    innodb_flush_method=O_DIRECT
    innodb_log_file_size=512M
    innodb_io_capacity=600
    thread_pool_oversubscribe=30
    thread_pool_size=64
    thread_pool_idle_timeout=7200
    thread_pool_max_threads=2000
    max_connections=5000
    key_buffer_size = 16M
    max_allowed_packet = 1M
    table_open_cache = 64
    sort_buffer_size = 512K
    net_buffer_length = 8K
    read_buffer_size = 256K
    read_rnd_buffer_size = 512K
    myisam_sort_buffer_size = 8M
    query_cache_type = 1
    query_cache_limit = 256K
    query_cache_min_res_unit = 2k
    query_cache_size = 80M
    tmp_table_size= 64M
    max_heap_table_size= 64M
    slow-query-log = 1
    slow-query-log-file = /app/zabbix_proxy_data/mysql/mysql-slow.log
    long_query_time = 1
    
    
    [mysqld_safe]
    log-error=/var/log/mariadb/mariadb.log
    pid-file=/var/run/mariadb/mariadb.pid
    
    #
    # include all files from the config directory
    #
    !includedir /etc/my.cnf.d
    

      

  • 相关阅读:
    【FIRST USE】第一次用git把代码上传到github
    [多线程学习笔记] 一个线程安全的队列
    C中宏展开问题
    C语言中的命名空间
    c语言中赋值语句的结果
    Python一些难以察觉的错误
    C语言中的内存压缩技术
    简述数据结构:二叉查找树
    指针与指针的引用、指针的指针
    C++ 中的virtual关键词
  • 原文地址:https://www.cnblogs.com/weidongliu/p/16179957.html
Copyright © 2020-2023  润新知