参照腾讯云和ucloudmy.cnf以及网上找的材料整顿出来的my.cnf,今后更正任何参数都邑延续革新,今朝是在测试阶段;物理机:ubuntu14.04设置8core32Gmysql:5.5.62
调优设置以下:
[client]port=socket=/var/run/mysqld/mysqld.sockdefault-character-set=utf8[mysqld_safe]socket=/var/run/mysqld/mysqld.sock[mysqld]user=mysqlpid-file=/var/run/mysqld/mysqld.pidsocket=/var/run/mysqld/mysqld.sockport=basedir=/usrdatadir=/var/lib/mysqltmpdir=/tmplc-messages-dir=/usr/share/mysqlskip-external-lockingkey_buffer=Mmax_allowed_packet=thread_stack=Kthread_cache_size=50max_connections=max_connect_errors=table_cache=max_heap_table_size=Mopen_files_limit=back_log=thread_concurrency=20sort_buffer_size=ft_min_word_len=4query_cache_size=0log_error=/var/log/mysql/error.loglog_slow_queries=/var/log/mysql/mysql-slow.loglong_query_time=3server-id=1log_bin=/var/log/mysql/mysql-bin.logexpire_logs_days=2tmp_table_size=#default_table_type=InnoDB#loose-skip-bdbdefault-storage-engine=InnoDBinnodb_file_format=barracuda#ROW_FORMAT=COMPRESSEDinnodb_additional_mem_pool_size=64Minnodb_buffer_pool_size=6Ginnodb_data_file_path=ibdata1:M:autoextendinnodb_read_io_threads=8innodb_write_io_threads=8innodb_thread_concurrency=20innodb_flush_log_at_trx_