摘要:以下配置文件為本人所在公司安裝時(shí)所用模板。微信號(hào)從庫關(guān)閉重要參數(shù)從庫設(shè)置為從庫設(shè)置為
以下配置文件為本人所在公司安裝mairadb時(shí)所用模板。
### /etc/my.cnf ### Author: makoo ### 微信號(hào): MariaDBA ### QQ:3543400 [client] port = 3306 socket = /data/mysql/mysql.sock [mysqld] port = 3306 socket = /data/mysql/mysql.sock basedir = /data/mysql datadir = /data/mysql/data tmpdir = /data/mysql/data ### skip-character-set-client-handshake log_bin_trust_function_creators = 1 innodb_print_all_deadlocks = 1 skip-external-locking skip-name-resolve autocommit = 1 innodb_thread_concurrency = 8 innodb_defragment = 1 character_set_server = utf8 init_connect = "SET NAMES utf8" init_connect = "SET collation_connection = utf8_general_ci" # 從庫關(guān)閉binlog log-bin = binlog binlog_format = ROW max_binlog_size = 256M expire_logs_days = 1 binlog_cache_size = 64K # server-id = 1001 innodb_data_home_dir = /data/mysql/data innodb_data_file_path = ibdata1:100M:autoextend innodb_log_group_home_dir = /data/mysql/data innodb_log_file_size = 128M innodb_log_buffer_size = 8M # 重要參數(shù) innodb_buffer_pool_size = 12288M #51200M #10240M innodb_flush_method = O_DIRECT innodb_file_per_table = 1 innodb_file_format = barracuda innodb_flush_log_at_trx_commit = 0 # CACHES AND LIMITS # query-cache-type = 0 query-cache-size = 0 open_files_limit = 65535 innodb_open_files = 8192 table_open_cache = 8192 thread_cache_size = 200 max_connections = 16384 max_user_connections = 10000 extra_max_connections = 100 max_connect_errors = 5000 # REPLICATION # read_only = 0 ### 從庫設(shè)置為1 event_scheduler = 1 ### 從庫設(shè)置為0 slave-net-timeout = 60 slave-skip-errors = 1062 slave_parallel_threads = 4 wait_timeout = 3600 interactive_timeout = 3600 lock_wait_timeout = 600 innodb_lock_wait_timeout = 600 concurrent_insert = 2 key_buffer_size = 256M max_allowed_packet = 64M sort_buffer_size = 2M read_buffer_size = 2M join_buffer_size = 2M read_rnd_buffer_size = 2M myisam_sort_buffer_size = 128M # LOGGING # log-error = db-error.log slow_query_log = 1 long_query_time = 2 #log-queries-not-using-indexes = 1 slow_query_log_file = db-slow.log log_slow_verbosity = query_plan tmp_table_size = 96M max_heap_table_size = 96M bulk_insert_buffer_size = 64M group_concat_max_len = 102400 [mysqldump] quick max_allowed_packet = 64M [mysql] no-auto-rehash
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://systransis.cn/yun/17579.html
摘要:進(jìn)入官網(wǎng)下載二進(jìn)制文件在此塊下載文件規(guī)劃數(shù)據(jù)庫存放位置創(chuàng)建數(shù)據(jù)庫賬號(hào)更改家目錄屬主屬組解壓縮創(chuàng)建軟連接進(jìn)入解壓目錄創(chuàng)建軟連接編譯時(shí)的名字為,所以要把的名字改為。 1:進(jìn)入官網(wǎng)下載二進(jìn)制文件 showImg(https://segmentfault.com/img/bVRMUV?w=554&h=290);https://downloads.mariadb.org...在此塊下載文件 sh...
閱讀 2109·2023-04-26 02:41
閱讀 2153·2021-09-24 09:47
閱讀 1560·2019-08-30 15:53
閱讀 1214·2019-08-30 13:01
閱讀 1894·2019-08-29 11:27
閱讀 2868·2019-08-28 17:55
閱讀 1779·2019-08-26 14:00
閱讀 3394·2019-08-26 10:18