CentOS6 under MySQL option file

Source: Internet
Author: User
Tags bulk insert change settings

MY.CNF content is as follows

# for advice The Change settings see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html[client]# Password=... # Port=... # socket=. .. default_character_set=Utf8[mysqld]basedir=/usr/local/Mysqldatadir=/usr/local/mysql/dataport=3306# server_id=.. user=Mysqlsocket=/tmp/mysql.sock# prohibit connection to database by domain name skip_name_resolve# prohibit external lock skip-external-locking# Specifies the buffer size to use for the index, and note that this parameter setting is too large to reduce the overall efficiency of the server key_buffer_size=384m# Specifies the accepted packet size Max_allowed_packet=16m# Specifies the number of open table caches Table_open_cache= +# binary Log binlog-ignore-db =Mysqlbinlog-ignore-db =Testbinlog-ignore-db =Information_schemabinlog-ignore-db =Performance_schemalog-bin =Mysqlbinbinlog_format=mixedexpire_logs_days=5# Slow query log Slow_query_log=1Long_query_time=2Slow_query_log_file=/usr/local/mysql/slowqueries.log# Remove Leading # To set options mainly useful forreporting servers.# The server defaults is faster fortransactions and fast selects.# Adjust sizes as needed, experiment toFindThe optimal values.# join_buffer_size=128m# sort_buffer_size=2m# read_buffer_size=2m# read_rnd_buffer_size=8m# Specifies the default behavior of the timestamp data type Explicit_defaults_for_timestamp=1# Specifies the size of the buffer allocated when sorting the MyISAM index myisam_sort_buffer_size=64m# Specifies the number of threads saved in the cache that can be re-exploited Thread_cache_size=8# Specify query buffer size query_cache_size=32m# Specifies the buffer size that a single query can use, and the default 1mquery_cache_limit=16m# Specifies the maximum number of connections Max_connections= +# Specify BULK INSERT cache size (for MyISAM) bulk_insert_buffer_size=128m# Specifies the InnoDB index and the data cache pool size Innodb_buffer_pool_size=1g# Specifies the InnoDB log file size innodb_log_file_size=512m# specifying the files available for the InnoDB table I/o number of threads, it is recommended that this parameter be set to 4innodb_file_io_threads in the non-Windows platform=4# with Barracuda row storage format, you can enable compression on the tablespace, only for the InnoDB table Innodb_file_format=Barracudainnodb_file_format_check=on# each InnoDB table to enable its own stand-alone tablespace innodb_file_per_table=1# Specifies the number of concurrent threads for the InnoDB kernel, which is set to 0 to not limit the number of concurrent innodb_thread_concurrency=0# Specify InnoDB tablespace data file name, size, and other properties Innodb_data_file_path=ibdata1:1g:autoextendinnodb_autoextend_increment= the# The m# specifies the InnoDB brush write log policy, by default 1 means that log buffer is written to the log every time a transaction is committed Innodb_flush_log_at_trx_commit=2[Mysqld_safe]log-error =/usr/local/mysql/Mysqld.logpid-file=/usr/local/mysql/Mysqld.pid[mysqldump]quickmax_allowed_packet=16m[mysql]no-auto-Rehash[myisamchk]read_buffer=2mwrite_buffer=2m[mysqlhotcopy]interactive-Timeoutsql_mode=no_engine_substitution,strict_trans_tables

Note:

1) during the installation of MySQL, it is a good idea to configure MY.CNF before running the initialization configuration script (scripts/mysql_install_db). Otherwise it will cause some problems, some warning solution reference:

http://my.oschina.net/panzhc/blog/207292

http://blog.itpub.net/14184018/viewspace-1061224/

2) MySQL 5.6 configuration options refer to Https://dev.mysql.com/doc/refman/5.6/en/server-options.html

CentOS6 under MySQL option file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.