锁 #
语法 | 描述 | 类型 |
---|---|---|
SHOW DIST LOCKS | 查看锁 | RQL |
UNLOCK DIST LOCK lock_key | 解锁 | RAL |
1. 查看锁 #
mysql> SHOW DIST LOCKS;
+------------+---------------------------------+
| lock_level | lock_key |
+------------+---------------------------------+
| database | /lock/database/locks/encrypt_db |
+------------+---------------------------------+
1 row in set (0.01 sec)
输出说明
lock_level
:锁级别 database库、table表lock_key
:锁的对象
输出说明
列 | 说明 |
---|---|
lock_level | 锁级别 database库、table表 |
lock_key | 锁的对象 |
2. 解锁 #
UNLOCK DIST LOCK lock_key
示例
UNLOCK DIST LOCK '/lock/database/locks/encrypt_db';