28-recovery.md 841 字节
Newer Older
1
---
2 3
sidebar_label: Error Recovery
title: Error Recovery
4 5
---

6
In a complex environment, connections and query tasks may encounter errors or fail to return in a reasonable time. If this occurs, you can terminate the connection or task.
7

8
## Terminate a Connection
9 10 11 12 13

```sql
KILL CONNECTION conn_id;
```

14
You can use the SHOW CONNECTIONS statement to find the conn_id.
15

16
## Terminate a Query
17 18 19 20 21

```sql
SHOW QUERY query_id;
```

22
You can use the SHOW QUERIES statement to find the query_id.
23

24
## Terminate a Transaction
25 26 27 28 29

```sql
KILL TRANSACTION trans_id
```

30
You can use the SHOW TRANSACTIONS statement to find the trans_id.
31

32
## Reset Client Cache
33 34 35 36 37

```sql
RESET QUERY CACHE;
```

38
If metadata becomes desynchronized among multiple clients, you can use this command to clear the client-side cache. Clients then obtain the latest metadata from the server.