dyok 发表于 2018-10-5 07:05:28

MySQL 5.7.22 二进制安装

  #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
  basedir=/opt/mysql                              #介质目录
  datadir=/opt/mysql/data                         #数据目录
  port=3306                                          #端口
  pid-file = /opt/mysql/data/mysql.pid            #进程id
  user = mysql                                       #启动用户
  socket=/opt/mysql/data/mysql.sock                #sock文件地址
  bind-address = 0.0.0.0                           #绑定ip 这里表示绑定所有ip
  server-id = 1                                    #用于复制环境钟标识实例,这个在复制环境里唯一
  character-set-server = utf8                        #服务端默认字符集,很重要,错误设置会出现乱码
  max_connections = 1000                           #允许客户端并发连接的最大数量
  max_connect_errors = 6000                        #如果客户端尝试连接的错误数量超过这个参数设置的值,则服务器不再接受新的客户端连接。
  open_files_limit = 65535                           #操作系统允许MySQL服务打开的文件数量。
  table_open_cache = 128                           #所有线程能打开的表的数量
  max_allowed_packet = 4M                            #网络传输时单个数据包的大小。
  back_log= 300
  binlog_cache_size = 4M
  max_heap_table_size = 8M
  tmp_table_size = 16M
  read_buffer_size = 2M
  read_rnd_buffer_size = 8M
  sort_buffer_size = 8M
  join_buffer_size = 8M
  key_buffer_size = 4M
  thread_cache_size = 8
  query_cache_type = 1
  query_cache_size = 8M
  query_cache_limit = 2M
  ft_min_word_len = 4
  log_bin = mysql-bin
  binlog_format = mixed
  expire_logs_days = 30
  log_error = /opt/mysql/logs/mysql-error.log
  slow_query_log = 1
  long_query_time = 1
  slow_query_log_file = /opt/mydql/logs/mysql-slow.log
  performance_schema = 0
  explicit_defaults_for_timestamp
  #lower_case_table_names = 1
  skip-external-locking
  default_storage_engine = InnoDB
  #default-storage-engine = MyISAM
  innodb_file_per_table = 1
  innodb_open_files = 500
  innodb_buffer_pool_size = 64M
  innodb_write_io_threads = 4
  innodb_read_io_threads = 4
  innodb_thread_concurrency = 0
  innodb_purge_threads = 1
  innodb_flush_log_at_trx_commit = 2
  innodb_log_buffer_size = 2M
  innodb_log_file_size = 32M
  innodb_log_files_in_group = 3
  innodb_max_dirty_pages_pct = 90
  innodb_lock_wait_timeout = 120
  bulk_insert_buffer_size = 8M
  myisam_sort_buffer_size = 8M
  myisam_max_sort_file_size = 10G
  myisam_repair_threads = 1
  interactive_timeout = 28800
  wait_timeout = 28800
  #lower_case_table_names = 1
  skip-external-locking
  default_storage_engine = InnoDB
  #default-storage-engine = MyISAM
  innodb_file_per_table = 1
  innodb_open_files = 500
  innodb_buffer_pool_size = 64M
  innodb_write_io_threads = 4
  innodb_read_io_threads = 4
  innodb_thread_concurrency = 0
  innodb_purge_threads = 1
  innodb_flush_log_at_trx_commit = 2
  innodb_log_buffer_size = 2M
  innodb_log_file_size = 32M
  innodb_log_files_in_group = 3
  innodb_max_dirty_pages_pct = 90
  innodb_lock_wait_timeout = 120
  bulk_insert_buffer_size = 8M
  myisam_sort_buffer_size = 8M
  myisam_max_sort_file_size = 10G
  myisam_repair_threads = 1
  interactive_timeout = 28800
  wait_timeout = 28800
  
  port=3306
  socket=/opt/mysql/data/mysql.sock
  
  no-auto-rehash
  #default-character-set=utf8
  safe-updates
  socket=/opt/mysql/data/mysql.sock
  
  quick
  max_allowed_packet = 32M
  
  interactive-timeout
  
  open-files-limit = 8192

页: [1]
查看完整版本: MySQL 5.7.22 二进制安装