Explanation of MySQL performance parameters: Skip-External-Locking parameter introduction, mysqlskiplocking
MySQL configuration file my. cnf contains a line of skip-external-locking parameters by default, 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.
Copy codeThe 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.
Copy codeThe Code is as follows:
# Skip-external-locking
If it is a single server environment, disable it. Use the following statement:
Copy codeThe Code is as follows:
Skip-external-locking
Notes
In earlier versions of MySQL, this parameter is written as follows:
Copy codeThe 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