MySQL configuration file my.cnf parsing

Source: Internet
Author: User

[Client]port= 3306Socket=/home/MySQL/MySQL/tmp/MySQL.Sock[mysqld]!include/home/MySQL/MySQL/etc/mysqld.cnf#contains the configuration file, the user name, the password file stored separatelyPort= 3309Socket=/home/MySQL/MySQL/tmp/MySQL.Sockpid-file=/longxibendi/MySQL/MySQL/var/MySQL.Pidbasedir=/home/MySQL/MySQL/DataDir=/longxibendi/MySQL/MySQL/var/#tmp dir settingsTmpdir =/home/MySQL/MySQL/tmp/slave-load-tmpdir =/home/MySQL/MySQL/tmp/#when slave executes load data infile#Language =/home/MySQL/MySQL/share/MySQL/english/character-sets-dir=/home/MySQL/MySQL/share/MySQL/charsets/#Skip OptionsSkip-name-resolve#Grant, you must use IP to not use host nameSkip-symbolic-links#cannot use connection fileSkip-external-locking#do not use system lock, to use MYISAMCHK, you must shut down the serverSkip-slave-start#start MySQL, do not start replication#Sysdate-is-now#Res SettingsBack_log = 50#The accept queue, which is placed in the cache for a request queue that does not have a TCP connection, has a queue size of Back_log, limited to OS parametersmax_connections = 1000#Maximum number of concurrent connections, increasing this value requires a corresponding increase in the number of file descriptors allowed to openMax_connect_errors = 10000#If a user initiates a connection error that exceeds this number, the user's next connection will be blocked until the administrator executes the flush hosts;#open_files_limit = 10240Connect-timeout = 10#The maximum number of seconds before the connection times out, and on the Linux platform, this timeout is also used as the time to wait for the server to respond firstWait-timeout = 28800#time to wait for the connection to closeInteractive-timeout = 28800#the inactivity time of interactive_timeout (superseded by wait_timeout) seconds is allowed before the connection is closed. The client's session Wait_timeout variable is set to the value of the session interactive_timeout variable. slave-net-timeout = 600#The server is also able to handle network connection outages. However, a network outage is notified only if the server has not received data from the primary server for more than slave_net_timeout secondsNet_read_timeout = 30#Timeout for reading information from the serverNet_write_timeout = 60#Timeout for writing information from serverNet_retry_count = 10#if the read operation for a communication port is interrupted, retry multiple times before discardingNet_buffer_length = 16384#Package message buffers are initialized to net_buffer_length bytes, but can grow to max_allowed_packet bytes when neededMax_allowed_packet = 64M##Table_cache = 512#The number of tables opened by all threads. Increasing this value can increase the number of file descriptors required by the mysqldThread_stack = 192K#stack size for each threadThread_cache_size = 20#Thread CachingThread_concurrency = 8#The data for the concurrently running thread is preferably twice times the number of CPUs. This machine is configured as the number of CPUs#Qcache SettingsQuery_cache_size = 256M#Query Cache SizeQuery_cache_limit = 2M#do not cache the results of queries larger than this valueQuery_cache_min_res_unit = 2K#minimum block size for query cache allocations#Default Settings#Time Zonedefault- Time-zone =system #Server time ZoneCharacter-set-server = UTF8#Server-level character setdefault-storage-engine = InnoDB#Default Storage#tmp & HeapTmp_table_size = 512M#temporary table size, if the value is exceeded, the result is placed on diskMax_heap_table_size = 512M#This variable sets the maximum amount of space the memory (HEAP) table can grow toLog-bin =MySQL-bin#These paths are relative to DataDirLog-bin-index =MySQL-bin.Indexrelay-Log= relay-LogRelay_log_index= relay-Log.Index#Warning & error logLog-warnings = 1Log-error =/home/MySQL/MySQL/Log/MySQL.Errlog_output=FILE #parameter log_output Specifies the format of the slow query output, the default is file, you can set it to table, and then you can query the MySQL schema of the Slow_log table.#Slow Query LogSlow_query_log = 1Long-query- Time= 1#Slow query time more than 1 seconds is slow querySlow_query_log_file =/home/MySQL/MySQL/Log/slow.Log#log-queries-not-using-indexes#log-slow-slave-statementsGeneral_log= 1General_log_file=/home/MySQL/MySQL/Log/MySQL.Logmax_binlog_size=1gmax_relay_log_size=1G#if use Auto-ex, set to 0relay-Log-purge = 1#when you do not have to relay the logs, delete them. This operation has the SQL thread complete#Max Binlog keeps daysExpire_logs_days = 30#Binlog removed for more than 30 daysbinlog_cache_size= 1M#Session Level#ReplicationReplicate-wild-ignore-table =MySQL.%#Ignore database and table when copyingReplicate-wild-ignore-table = test.%#Ignore database and table when copying#Slave_skip_errors=allkey_buffer_size= 256M#MyISAM index buffer, only key does not have dataSort_buffer_size = 2M#sort buffer size; thread levelRead_buffer_size = 2M#buffer size of data scanned in full table scan (sequential scan); thread levelJoin_buffer_size = 8M#Join buffer size, thread levelRead_rnd_buffer_size = 8M#MyISAM The buffer size of the data by scanning the index Scan (Random scan); thread levelBulk_insert_buffer_size = 64M#MyISAM the size of the tree buffer used in the block insert optimization. Note: This is a per thread limitationMyisam_sort_buffer_size = 64M#MyISAM Sets the size of the buffer used when the table is restored, when the buffer is allocated on repair table or in the order MyISAM index is created with the CREATE INDEX or ALTER TABLE procedureMyisam_max_sort_file_size = 10G#MyISAM If the temporary file becomes more than the index, do not use the Quick Sort index method to create an index. Note: This parameter is given as a byte. When rebuilding the MyISAM index (during repair table, ALTER table, or Load DATA infile), the maximum space size for the temporary files that MySQL uses is allowed. If the size of the file exceeds this value, it is much slower to create the index using the key-value cache. The unit of the value is in bytesMyisam_repair_threads = 1#if the value is greater than 1, the MyISAM table index (each index in its own line range) is created in parallel in the repair by sorting procedureMyisam_recover = 64K#maximum allowable length of the Group_concat () function resulttransaction_isolation= repeatable-readinnodb_file_per_table#innodb_status_file = 1#innodb_open_files = 2048Innodb_additional_mem_pool_size = 100M#The frame cache control object needs to request a cache from here, so this value corresponds to the Innodb_buffer_poolInnodb_buffer_pool_size = 2G#includes data pages, index pages, insert caches, lock information, adaptive hashing, data dictionary informationInnodb_data_home_dir =/longxibendi/MySQL/MySQL/var/#Innodb_data_file_path = Ibdata1:1g:autoextendInnodb_data_file_path = Ibdata1:500m;ibdata2:2210m:autoextend#Table SpaceInnodb_file_io_threads = 4#number of IO threadsInnodb_thread_concurrency = 16#InnoDB try to keep the number of operating system threads within the InnoDB less than or equal to the limit given by this parameterInnodb_flush_log_at_trx_commit = 1#the data in each commit log cache is brushed to diskinnodb_log_buffer_size= 8M#thing log CacheInnodb_log_file_size = 500M#thing log size#innodb_log_file_size =100mInnodb_log_files_in_group = 2#two sets of things logInnodb_log_group_home_dir =/longxibendi/MySQL/MySQL/var/#Log Groupinnodb_max_dirty_pages_pct= 90#InnoDB The main thread flushes the data in the cache pool so that the dirty data scale is less than 90%Innodb_lock_wait_timeout = 50#The InnoDB transaction can wait for a locked timeout number of seconds before being rolled back. InnoDB automatically detects the transaction deadlock in its own locking table and rolls back the transaction. InnoDB Use the Lock tables statement to notice the locking settings. The default value is 50 seconds#Innodb_flush_method = O_dsync[Mysqldump]quickmax_allowed_packet=64m[MySQL]disable-auto-rehash#Allow tab Promptdefault-character-set =Utf8connect-timeout = 3

MySQL configuration file my.cnf parsing

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.