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
不积跬步,无以至千里;不积小流,无以成江海。