MySQL memory parameters and adjustments

Source: Internet
Author: User

1. Slow Query log:

Slow_launch_time=2 the value of a query greater than a certain time (unit: s)

Slow_query_log=on/off Turn off slow query log

Slow_query_log_file=/opt/data/host-slow.log Slow Query Log location

2. Number of connections:

Max_connections MySQL Maximum number of connections

Back_log when the number of connections is full, set a value that allows the number of connections to enter the wait stack

Max_connect_errors account number of errors allowed to connect to the server

Connect_timeout maximum time for a connection message (in s)

Skip-name-resolve join MY.CNF, MySQL will receive the connection request, according to the request package

The IP that is obtained in the reverse trace of the requestor's host name. And then again based on the return

Host name again to get the IP. If the IP is the same two times, then the connection is successfully established.

Add a second parameter , you can save this step

NOTES:

Query the current number of connections: Show global status like ' connections ';

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.