0

Mysql - Table lock error

Question:

I am experiencing some problems with table locking. when I am trying to write/update to tables it's showing the error

Table 't1' was locked with a READ lock and can't be updated

connor
asked Dec 1, 2020
1 Answer
0

Answer:

Here's what I do to FORCE UNLOCK FOR some locked tables in MySQL

Enter MySQL

mysql -u your_user -p

Let's see the list of locked tables

mysql> show open tables where in_use>0;

Let's see the list of the current processes, one of them is locking your table(s)

mysql> show processlist;

Let's kill one of these processes

mysql> kill put_process_id_here;

View More
linuxhelp
answered Dec 1, 2020
Your Answer
||||
 
100:0