Skip to content
Advertisement

Re: MySQL 8.0 Command Line Client Error 1205

MySQL 8.0 Command Line Client is giving me a timeout error and I have restarting the transaction by typing “start transaction” another time. Keep in mind that I have another command line open with the table CIA_DATA.new_table and it is also being updated with the same changes. (I am doing this to follow a tutorial.) Here is the script:

Updated code for help in Answers Comments:

Thanks, thecoolgeek

Advertisement

Answer

What happen ony your computer:

  1. One transaction locks the table and you didn’t release the lock by endind the transaction.

  2. you start a new tansaction and it encounters a lockesd table and waits for the release

  3. As the first transaction and the lock wasn’t released, the secnd goes into to timeout.

Locks are in the best case difficult. and sometimes it takes hours or days to solve them.

so close the tranaction as fast as you can, so that the timeout not happen or increase the timeout https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_lock_wait_timeout

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement