Explanation of MySQL Performance parameters Skip-External-Locking parameter introduction _ MySQL

Source: Internet
Author: User
MySQL configuration file my. cnf contains a skip-external-locking parameter by default, that is, the external lock is skipped. According to the official explanation of the MySQL development website, External-locking is used to lock the MySQL configuration file my For The MyISAM data table under multi-process conditions. by default, a line of skip-external-locking parameter exists in cnf, that is, "skip external lock ". According to the official explanation of the MySQL development website, External-locking is used to lock the MyISAM data table under multi-process conditions.
If you have multiple servers using the same database Directory (not recommended), you must enable external locking on each server;

Parameter description

When the external-locking function, to access the data table, each process must wait for the previous process to complete the operation and unlock it. Because the server often needs to wait for unlocking to access the data table, external locking may degrade MySQL Performance in a single server environment. Therefore, in many Linux distributions, skip-external-locking is used by default in the MySQL configuration file to avoid external locking.
After skip-external-locking is used, to use MyISAMChk to check the database or repair or optimize the table, you must ensure that the MySQL server does not use the table to be operated during this process. If you have not stopped the server, you must at least run it first.

The code is as follows:


Mysqladmin flush-tables

Command. Otherwise, an exception may occur in the data table.

Parameter instructions
If you want to enable the external locking feature in a multi-server environment, comment out this line.

The code is as follows:


# Skip-external-locking


If it is a single server environment, disable it. use the following statement:

The code is as follows:


Skip-external-locking

Notes
In earlier versions of MySQL, this parameter is written as follows:

The code is as follows:


Skip-locking

If this statement is still used in the new MySQL configuration, it may appear:
[Warning] '-skip-locking' is deprecated and will be removed in a future release. Please use'-skip-external-locking 'instead.
Error.

Original site: http://www.bootf.com/594.html

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.