标签:pass ror type group log-bin print reads inno for
一. 安装环境准备mkdir /var/lib/mysql_5.7.22/{data,logs,tmp} -p
chown -R mysql:mysql /var/lib/mysql_5.7.22
yum -y install numactl.x86_64
error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory
log_timestamps=SYSTEM
explicit_defaults_for_timestamp = 1
user = mysql
server-id = 57
port = 3306
basedir = /usr/local/mysql_5.7.22/
datadir = /var/lib/mysql_5.7.22/data/
tmpdir = /var/lib/mysql_5.7.22/tmp/
socket = /var/lib/mysql_5.7.22/tmp/mysql.sock
skip_name_resolve = 1
slave_skip_errors = 1062
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
init_connect = ‘SET NAMES utf8mb4‘
lower_case_table_names = 1
max_connections = 1000
max_connect_errors = 99999
max_allowed_packet = 128M
interactive_timeout = 1800
wait_timeout = 1800
tmp_table_size = 134217728
max_heap_table_size = 134217728
query_cache_size = 0
query_cache_type = 0
read_buffer_size = 131072
read_rnd_buffer_size = 262144
sort_buffer_size = 2097152
binlog_cache_size = 524288
back_log = 130
log_error = /var/lib/mysql_5.7.22/logs/error.log
slow_query_log = on
slow_query_log_file = /var/lib/mysql_5.7.22/logs/mysqld-slow.log
log_queries_not_using_indexes = 1
log_throttle_queries_not_using_indexes = 5
long_query_time = 3
min_examined_row_limit = 100
expire_logs_days = 5
log-bin = mysql-bin
binlog_format = MIXED
log_slave_updates
innodb_buffer_pool_size = 6G
innodb_log_buffer_size = 16777216
innodb_flush_method = O_DIRECT
innodb_write_io_threads = 2
innodb_read_io_threads = 6
#innodb_log_group_home_dir = /data/logs/redolog/
#innodb_undo_directory = /data/logs/undolog/
innodb_log_files_in_group = 3
innodb_log_file_size = 1024M
#innodb_undo_log_truncate = 1
#innodb_undo_tablespaces = 3
#innodb_undo_logs = 128
innodb_print_all_deadlocks = 1
[mysqldump]
quick
max_allowed_packet = 128M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 256k
read_buffer = 2M
write_buffer = 2M
[mysqld_safe]
open-files-limit = 28192
log-error=/var/lib/mysql_5.7.22/logs/mysqld.log
pid-file=/var/lib/mysql_5.7.22/tmp/mysqld.pid
二. 安装初始化
tar -xf mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
mv mysql-5.7.22-linux-glibc2.12-x86_64/ mysql_5.7.22
/usr/local/mysql_5.7.22/bin/mysqld --defaults-file=/usr/local/mysql_5.7.22/my.cnf --basedir=/usr/local/mysql_5.7.22/ --datadir=/var/lib/mysql_5.7.22/data/ --initialize
/usr/local/mysql_5.7.22/bin/mysqld_safe --defaults-file=/usr/local/mysql_5.7.22/my.cnf &
touch /var/lib/mysql_5.7.22/logs/mysqld.log
grep password /var/lib/mysql_5.7.22/logs/error.log 查看原始密码
/usr/local/mysql_5.7.22/bin/mysql -uroot -p‘yn.X?gQ!d2?3‘ -S /var/lib/mysql_5.7.22/tmp/mysql.sock
标签:pass ror type group log-bin print reads inno for
原文地址:http://blog.51cto.com/lingxudong/2322097