首页 / MYSQL / mysql5.7 主从
mysql5.7 主从
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了mysql5.7 主从,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3052字,纯文字阅读大概需要5分钟。
内容图文
![mysql5.7 主从](/upload/InfoBanner/zyjiaocheng/466/b0ee554c25a14cb58a9058a810c3e311.jpg)
1.主my.cnf [client] port = 3306 socket = /opt/3306/mysql.sock character-set-server = utf8 [mysql] no-auto-rehash [mysqld] user = mysql port = 3306 character-set-server = utf8 socket = /opt/3306/mysql.sock basedir = /opt/mysql datadir = /opt/3306/data explicit_defaults_for_timestamp = true skip-ssl secure-file-priv = NULL lower_case_table_names = 1 back_log = 300 max_connections = 3000 max_connect_errors = 100 table_open_cache = 4096 external-locking = FALSE max_allowed_packet = 32M sort_buffer_size = 16M join_buffer_size = 16M thread_cache_size = 16 query_cache_size = 128M query_cache_limit = 4M ft_min_word_len = 8 thread_stack = 512K transaction_isolation = REPEATABLE-READ tmp_table_size = 128M max_heap_table_size = 128M ###*** slow query parameters long_query_time = 6 slow_query_log slow_query_log_file = /opt/3306/slow.log ###*** binlog parameters log-bin = /opt/3306/mysql-bin binlog_cache_size = 4M max_binlog_cache_size = 256M max_binlog_size = 32M #binlog_format = MIXED binlog_format = row expire_logs_days = 7 ###*** relay-log parameters #relay-log = /opt/3307/relay-bin #relay-log-info-file = /opt/3307/relay-log.info #master-info-repository = table #relay-log-info-repository = table #relay-log-recovery = 1 #*** MyISAM parameters key_buffer_size = 16M read_buffer_size = 1M read_rnd_buffer_size = 16M bulk_insert_buffer_size = 1M #skip-name-resolve ###*** master-slave replication parameters server-id = 1 slave-skip-errors = all #*** Innodb storage engine parameters innodb_buffer_pool_size = 2G innodb_data_file_path = ibdata1:10M:autoextend #innodb_file_io_threads = 8 innodb_thread_concurrency = 16 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 16M innodb_log_file_size = 512M innodb_log_files_in_group = 3 innodb_max_dirty_pages_pct = 90 innodb_lock_wait_timeout = 120 innodb_file_per_table = on sql_mode=‘STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION‘ gtid-mode=on enforce-gtid-consistency=true master-info-repository=TABLE relay-log-info-repository=TABLE sync-master-info=1 slave-parallel-workers=2 binlog-checksum=CRC32 master-verify-checksum=1 slave-sql-verify-checksum=1 binlog-rows-query-log_events=1 report-port=3306 report-host=ip ######填写自己的ip connect-timeout = 60 wait-timeout = 28800 net_buffer_length = 16384 thread_stack = 192K #thread_concurrency = 128 query_cache_min_res_unit = 2 default-time-zone = system character-set-server = utf8 default-storage-engine = InnoDB max_relay_log_size = 1G [mysqldump] quick max_allowed_packet = 32M [myisamchk] key_buffer = 16M sort_buffer_size = 16M read_buffer = 8M write_buffer = 8M [mysqld_safe] open-files-limit = 8192 log-error=/opt/3306/mysql_3306.err pid-file=/opt/3306/mysqld.pid
本文出自 “人,要有自己的想法” 博客,请务必保留此出处http://szgb2016.blog.51cto.com/340201/1793140
mysql5.7 主从
标签:5.7 主从
本文系统来源:http://szgb2016.blog.51cto.com/340201/1793140
内容总结
以上是互联网集市为您收集整理的mysql5.7 主从全部内容,希望文章能够帮你解决mysql5.7 主从所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。