backup
This commit is contained in:
parent
35d57e4c7c
commit
fc99a64d28
|
@ -0,0 +1,4 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/.idea/workspace.xml
|
||||||
|
.idea
|
|
@ -34,4 +34,3 @@ mount
|
||||||
# 查看磁盘分区
|
# 查看磁盘分区
|
||||||
lsblk
|
lsblk
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,16 @@ information_schema这张数据表保存了MySQL服务器所有数据库的信息
|
||||||
3. `innodb_lock_waits` 锁等待的对应关系
|
3. `innodb_lock_waits` 锁等待的对应关系
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
|
-- 查看当前连接数
|
||||||
|
SHOW STATUS LIKE 'Threads_connected';
|
||||||
|
-- 查看系统设置连接数
|
||||||
|
SHOW VARIABLES LIKE 'max_connections';
|
||||||
|
-- 查看那个表被锁住
|
||||||
|
SHOW OPEN TABLES WHERE In_use > 0;
|
||||||
-- 查看哪个事物占用锁
|
-- 查看哪个事物占用锁
|
||||||
select * from information_schema.innodb_trx;
|
select * from information_schema.innodb_trx;
|
||||||
|
-- 杀死进程
|
||||||
|
kill trx_mysql_thread_id;
|
||||||
select trx_mysql_thread_id from information_schema.innodb_trx where trx_state ='LOCK WAIT ';
|
select trx_mysql_thread_id from information_schema.innodb_trx where trx_state ='LOCK WAIT ';
|
||||||
-- 查看所有进程
|
-- 查看所有进程
|
||||||
show full processlist;
|
show full processlist;
|
||||||
|
|
Loading…
Reference in New Issue