I am trying to truncate my table on mysql workbench
truncate pbx_api.confbridges;
but it says
Error Code: 1192. Can't execute the given command because you have active locked tables or an active transaction
I am trying to truncate my table on mysql workbench
truncate pbx_api.confbridges;
but it says
Error Code: 1192. Can't execute the given command because you have active locked tables or an active transaction
I solved this problem using SQL query : UNLOCK TABLES;
It means that the table is exclusively locked and is under transaction. You cannot truncate until it is rollbacked or committed.
For example to unlock tables, see @Cleber Griff's answer.