1. 更改MySQL Data File位置
datadir=/data/mysql
socket=/data/mysql/mysql.sock
2. 调整OS参数
* soft nproc 10240
* hard nproc 10240
* soft nofile 102400
* hard nofile 102400
* soft stack 10240
* hard stack 10240
3. 调整MySQL参数
innodb_buffer_pool_size = 300G # (adjust value here, 50%-70% of total RAM)
innodb_log_file_size = 256M
innodb_flush_log_at_trx_commit = 1 # may change to 2 or 0
innodb_flush_method = O_DIRECT
max_connections=10240
max_connect_errors=100000
open_files_limit=102400
4. 客户端配置调整
[client]
port=3306
socket=/data/mysql/mysql.sock