Sincerely ask big a problem here:
Environment: centos 7
Mysql 5.7.17
Export table structure of operational command:
The mysqldump -u root - PXXXXX -- socket=mysql. The sock - no - data '-- the log - error=instance_from_3341_20200501. 0110 _structure. Log' -- verbose -- databases test
Original intention is thought of mysql database instance test table structure, after running the above phenomenon is:
1, always stop the output on the page below:
CREATE DATABASE/*! 32312 IF NOT EXISTS */` test `/*! 40100 the DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */.
USE ` test `;
And then wait for a long time, time is very long (the longest one hour)
2, and then, after a long wait, process automatically exit, the result is what files are not
3, in the corresponding log_error file has a record of the following:
- Connecting to localhost...
The mysqldump: Got error: 1205: the Lock wait timeout exceeded; Try restarting transaction when using the LOCK TABLES
4, the key is: not a test user, but the other test1 run this command is normal
According to the above error system, a large amount of information on the Internet, are the following operations:
In the table 1, innodb_trx and the PROCESSLIST uncommitted transactions;
2, and then kill off the corresponding thread
Based on the above, I query innodb_trx and the PROCESSLIST table on the test and record of test1 found
Both instances exist in these two table records, some processes exist for a long time, but the corresponding SQL statements are dynamic,
INNODB_LOCKS INNODB_LOCK_WAITS and found no record of lock
So the question is:
1, so why not test the user test1 can normal export?
2, the test users to export table structure problem, how should solve?
Thank you very much, sincerely for your help,