A. 单次生效设置
进入mysql命令
mysql -uroot -p
show variables like "%_buffer%";(不要忘记带;号,没有;号表示一条语句没有结束)
默认的innodb_buffer_pool_size=8M
tmp_table_size = 4G
max_heap_table_size = 256M
innodb_file_format = Barracuda
default-time-zone = '+08:00'
connect_timeout = 600
max_allowed_packet = 500M
innodb_strict_mode=0
SET GLOBAL innodb_buffer_pool_size=4*1024*1024*1024;
innodb_log_buffer_size=512M
B. 永久生效设置
vim /etc/my.cnf.d/server.cnf