mysqldump stuck at "Connecting to" I'm having a weird problem with mysqldump. I have a docker instance of mysql (5.7) to which I can connect just fine (to any database). I can also use mysqldump to dump the databases except one - after executing mysqldump on that database it simply hangs on "Connecting to " and does nothing.

I use simple:

mysqldump --routines=true -v -h &lt;host&gt; -u root -p&lt;pass&gt; &lt;database&gt;


I also tried adding: --single-transaction or -l without much success.

I can connect to this database just fine (if I switch mysqldump to mysql).

I'm not really sure how to debug this issue further as there are no errors nor log entries.
OK, so show processlist; revealed that some queries got stuck in "Waiting to lock metadata" on that table. show engine innodb status \G helped identify the offending transaction and then simple KILL &lt;id&gt; unlocked the system.