#编译安装mysql5.7.17 

[root@web_1 data]# cat ../my.cnf 


[client]

port=3307

socket=/data/3307/mysql.sock


[mysqld]


user = mysql

basedir = /usr/local/mysql

datadir = /data/3307/data

port=3307

server-id = 1

socket=/data/3307/mysql.sock


character-set-server = utf8

log-error = /data/3307/error.log

pid-file = /data/3307/mysql.pid

general_log = 1

skip-name-resolve

#skip-networking

back_log = 300


max_connections = 1000

max_connect_errors = 6000

open_files_limit = 65535

table_open_cache = 128 

max_allowed_packet = 4M

binlog_cache_size = 1M

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 = 28M

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



performance_schema = 0

explicit_defaults_for_timestamp


#lower_case_table_names = 1




myisam_sort_buffer_size = 8M

myisam_repair_threads = 1


interactive_timeout = 28800

wait_timeout = 28800



symbolic-links=0


sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER,STRICT_TRANS_TABLES


[mysqldump]

quick

max_allowed_packet = 16M


[myisamchk]

key_buffer_size = 8M

sort_buffer_size = 8M

read_buffer = 4M

write_buffer = 4M