MySQL Tutorial configuration file detailed (a)

Source: Internet
Author: User
Tags mysql tutorial

./configure--prefix=/usr/local/mysql \

--without-debug \ #去除 Debug mode.

--enable-thread-safe-client \ #以线程方式编译客户端.

--with-pthread \ #强制使用 pthread line libraries compile.

--enable-assembler \ #允许使用汇编模式.

--enable-profiling\ #Build a Versionwith query profiling code (req.community-features)

Additional link parameters for--with-mysqld-ldflags=-all-static \ #静态编译 mysqld.

--with-client-ldflags=-all-static \ #静态编译 Additional link parameters for the client.

--with-charset=utf8 \ #默认字符 UTF8.

--with-extra-charsets=all \ #支持所有的语言字符.

--WITH-INNODB \ #innodb Data Engine.

--with-plugins=innobase \

--WITH-PLUGINS=HEAP \ #内存数据引擎.

--with-mysqld-user=mysql \ #mysql安装使用的帐号

--without-embedded-server \ #去除安装 Embedded-server.

--with-server-suffix=-community \ #社区形式安装.

--with-unix-socket-path=/tmp/mysql.sock

General Settings for MYSQl startup:

/ETC/MY.CNF Basic set of parameters.

# Back_log is the number of connections that the operating system can hold in the listening queue.

# The queue holds the connection before the MySQL Connection Manager thread is processed.

# If you have a very high connection rate and the "connection refused" error occurs,

# You should increase the value here.

# Check your operating system documentation to get the maximum value for this variable.

# If you set the Back_log to a higher value than your operating system, it will not be effective

# The maximum number of connection requests that are allowed in the MYSQL connection request waiting queue. DEFAUTL=50, Max 65535, is set according to the OS's situation with the network listening queue.

Back_log =20000

# The maximum number of simultaneous sessions allowed by the MySQL service

# One of the connections will be logged in as an administrator with SUPER privileges reserved.

# even if the maximum number of connections has been reached.

# The maximum number of connections allowed for the entire MySQL. This parameter affects MySQL's application concurrency processing power. Some of the information mentioned in 500-800, in our machine, a single Mysql instance setting 10000 should be no problem. If you still need third-party software to resolve the problem with your PHP connection pool, you will need to increase your connection pool.

Max_connections = 10000

# The maximum number of errors per client connection is allowed if this limit is reached.

# This client will be blocked by the MySQL service until the "FLUSH HOSTS" is executed or the service restarts

# illegal passwords and other errors at the time of linking increase this value.

# View the "aborted_connects" status to get the global counters. max_connect_errors= 10

# The number of tables opened by all threads.

# Increasing this value increases the number of file descriptors required by the MYSQLD

# so you need to make sure that the "open-files-limit" variable set in [Mysqld_safe] sets the number of open files allows at least

4096

# The actual needs are set according to the following life.

# mysq>show variables like ' Table_cache ';

# Mysq>show status Lie ' open_tables ';

Table_cache = 2048

# Allow external file-level locks. Opening a file lock can adversely affect performance

# so use this option only if you are running multiple DB instances on the same file (note that there will still be other constraints!)

# or you use some other software dependencies on the file level to lock the MyISAM table

#external-locking

# The maximum size of the request packet that the service can handle and the maximum request size that the service can handle (when with a large BLOB

is necessary to work with fields)

# Each connection is independent of size. Dynamic Increase in size

# This is the maximum value of net buffer that corresponds to the net_buffer. Default is 16M

Max_allowed_packet = 16M

# Binlog in a transaction in order to record the cache size held by the SQL state

# If you often use large, multi-declarative transactions, you can increase this value to get greater performance.

# All the status of the service will be buffered in the Binlog buffer and then written to Binlog once committed

# If the transaction is larger than this value, the temporary file on disk will be used instead.

# This buffer is created when the status of each connected transaction is updated the first time

Binlog_cache_size= 1M

# The maximum capacity allowed for a separate memory table.

# This option prevents accidental creation of a large memory table resulting in all memory resources being exhausted. Max_heap_table_size = 64M

# sort buffers are used to handle orders that are similar to the order by and the GROUP by queue

# If the sorted data cannot be placed in the sort buffer,

# An alternative disk-based merge classification will be used

# View the "sort_merge_passes" status variable.

# assigned by each thread when sorting occurs

Sort_buffer_size = 8M

http://user.qzone.qq.com/2858415798/blog/1451869352


qq:2858415798

MySQL Tutorial configuration file detailed (a)

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.