Preloader image
DDD

데이터베이스

Cafe24(카페24) - DB Lock 풀기

작성자 관리자 (admin)
조회수 11,524
입력일 2023-02-05 07:17:02

DB Dump 받다가 Lock 걸림.

1) MobaXterm - SSH 접속프로그램
2) 계정 접속

$ mysql -pPassword
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 401839032
Server version: 5.5.17-log MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use DB_NAME;
mysql> show processlist; --> 목록의 쿼리 아이디로 아래와 같이 LOCK 걸려있거나 멈춰있는 QUERY 청소

mysql> KILL QUERY 401757627;
Query OK, 0 rows affected (0.00 sec)

mysql> KILL QUERY 401762740;
Query OK, 0 rows affected (0.00 sec)

mysql> KILL QUERY 401762886;
Query OK, 0 rows affected (0.00 sec)