MySQL Query Cache)

Source: Internet
Author: User

MySQL Query Cache (Cache) SQL code www.2cto.com # Example MySQL config file for medium systems. # is generated by editing the mysql-5.1.37-win32 OF THE my-medium.ini, and the application and database are on one machine. # This is for a system with little memory (32 M-64 M) where MySQL plays # an important part, or systems up to 128 M where MySQL is used together with # other programs (such as a web server) # You can copy this file to #/etc/my. cnf to set global options, # mysql-data-dir/my. cnf to set server-specific options (in this # installation this directory is C: \ mysql \ data) or #~ /. My. cnf to set user-specific options. # In this file, you can use all long options that a program supports. # If you want to know which options a program supports, run the program # with the "-- help" option. # The following options will be passed to all MySQL clients # The following options will be read by The MySQL client application. # note that only client applications attached to MySQL can read this section. # if you want your own MySQL application to obtain these values # You need to specify these options when initializing the MySQL client library www.2cto.com [c Lient] # password = your_password # default port of the mysql client, which is meaningless to the application. The installer does not modify this parameter. Port = 3316 socket =/tmp/mysql. sock # Here follows entries for some specific programs # MySQL server # The MySQL server [mysqld] # Database port. The default value is 3316. The installer automatically identifies The port, in 3316, select the available port = socket =/tmp/mysql. sock skip-locking # MyISAM related options, because the storage engine INNODB is used, this segment settings are retained by default without modification. # Keyword buffer size, which is generally used to Buffer Index blocks of MyISAM tables. # Do not set it to 30% greater than your available memory. # because some of the memory is also used by the OS to buffer row data # Even if you do not use the MyISAM table, you also need to set up the 8-64 M memory because it will also be used by the internal temporary disk table. key_buffer_size = 16 M max_allowed_packet = 1 M table_open_cache = 64 sort_buffer_size = 512 K net_buffer_length = 8 K # buffer size used for full table scan of the MyISAM table. # allocate data in the corresponding thread when full table scan is required. read_buffer_size = 256 K # When a row is read from a sorted sequence after sorting, the row data is read from this buffer to prevent disk seek. # If you increase this value, you can increase the number of ORDE R by performance. # when needed, read_rnd_buffer_size = 512 K # This buffer is required for MySQL in REPAIR, OPTIMIZE, ALTER and load data infile are allocated when re-indexing is caused by an empty table. # This is allocated in each thread. therefore, be careful when setting the token. myisam_sort_buffer_size = 8 M # Don't listen on a TCP/IP port at all. this can be a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets or Named pipes. # Note that using this option without enabling named pipes on Windows # (via the "enable-named-pipe" option) will render mysqld useless! # Skip-networking # Replication Master Server (default) # binary logging is required for replication # enable the binary log function. # In the replication configuration, this item must be enabled as the MASTER server # If you need to perform time-point-based recovery from your final backup, you also need binary logs. log-bin = mysql-bin # binary logging format-mixed recommended binlog_format = mixed # required unique id between 1 and 2 ^ 32-1 # defaults to 1 if master-host is not set # but will not function as a mas Ter if omitted # unique service identification number. The value ranges from 1 to 2 ^ 32-1. # This value must be set on both master and slave. # If "master-host" is not set, the default value is 1. However, if this option is ignored, MySQL will not take effect as the master. server-id = 1 # Replication Slave (comment out master section to use this) # To configure this host as a replication slave, you can choose between # two methods: #1) use the change master to command (fully described in our manual)-# the syntax is: # CHA Nge master to MASTER_HOST =

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.