show global variables like '%timeout%';
show global variables like '%buffer%';
innodb_buffer_pool_size = 60G
wait_timeout = 2400
show global variables like '%wait_timeout%';
show global variables like '%innodb_buffer_pool_size%';
[mysqld] # # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove the leading "# " to disable binary logging # Remove leading # to revert to previous value for default_authentication_plugin, # this will increase compatibility with older clients. For background, see: # https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin port=13306 default-authentication-plugin=mysql_native_password #datadir=/opt/data/mysql/mysql #socket=/opt/data/mysql/mysql/mysql.sock datadir=/opt/data/mysql/mysql/mysql socket=/opt/data/mysql/mysql/mysql/mysql.sock #socket=/opt/data/mysql/tbsql/var/lib/mysql/mysql.sock #datadir=/opt/data/mysql/tbsql/var/lib/mysql log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid #内部内存临时表的最大值。 ##比如大数据量的group by ,order by时可能用到临时表, ##超过了这个值将写入磁盘,系统IO压力增大 tmp_table_size=64M max_heap_table_size=64M #inner left right join时用到 ##建议先调整为4M,后期观察调整 join_buffer_size=4M sql_mode='STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' innodb_buffer_pool_size = 36G wait_timeout = 86400
标签:opt,buffer,variables,配置,参数,mysql,data,size From: https://www.cnblogs.com/ruiy/p/18237000