Provides you with an in-depth understanding of Mysql external locks

Source: Internet
Author: User

Mysql External Locking is one of the locking methods. The following describes Mysql External Locking for your reference. If you are interested in Mysql External Locking, take a look.

Mysql external lock:

The server can also use external locks (file-level locks) to prevent other programs from modifying files when the server uses tables. In general, in the table check operation, the server locks the external key to use with myisamchk or isamchk.

However, Mysql external locks are disabled in some systems because they cannot work reliably. The process of running myisamchk or isamchk depends on whether the server can use external locks. If not, use the internal lock protocol.

If the server runs with the -- skip-locking option, the external lock is disabled. This option is default in some systems, such as Linux. You can run the mysqladmin variables command to determine whether the server can use external locks. Check the value of the skip_locking variable and follow these methods:

◆ If skip_locking is off, the external lock is valid. You can continue and run a utility to check the table. Servers and utilities will work together to access tables. However, before running any utility, use mysqladmin flush-tables. To repair a table, use the repair lock protocol of the table.

◆ If skip_locaking is on, Mysql External Locking is disabled. Therefore, checking and repairing myisamchk or isamchk indicates that the server is unknown. It is best to disable the server. If the server is always on, make sure that you use this to indicate that no client is allowed to access it. The clientworker lock protocol must be used to tell the server that the table is not accessed by other clients.
 

Implementation of Mysql multi-Table Deletion

Back up data based on Mysql tables

MySQL Show statement usage

How to clear a table in Mysql

Command for viewing the Mysql table structure

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.