0

I have a problem with these two statements. The first statement works fine..but the second throws the error code

'Error Code:2013. Lost connection to mysql server during query'.

If I comment out the first and starting at the second...the same error code is coming up. So, why does this second statement not work? By the way the 'lock_wait_timeout' variable is set to 31536000. THX

SET FOREIGN_KEY_CHECKS = 0;
SET UNIQUE_CHECKS = 0;
SET sql_log_bin = 0;

INSERT INTO audit.weitere_infos     (ADDITIONAL_INFORMATION,ALTERNATIVE_SCRIPT,CATEGORY,CODES,COUNTRY,COUNTRY_OF_ACTIVITY,COUNTRY_OF_ORIGIN,DOB,FULL_NAME,FUNCTIONS,GENDER,POB,TITLE,nummer_id)
SELECT   ADDITIONAL_INFORMATION,ALTERNATIVE_SCRIPT,CATEGORY,CODES,COUNTRY,COUNTRY_OF_ACTIVITY,COUNTRY_OF_ORIGIN,DOB,FULL_NAME,FUNCTIONS,GENDER,POD,TITLE,NUMMER FROM audit.alle_datensaetze;

INSERT INTO audit.schweizer (NUMMER,FIRST_NAME,LAST_NAME,OTHER_NAMES,RELATIVE_ID)
SELECT NUMMER,FIRST_NAME,LAST_NAME,OTHER_NAMES,RELATIVE_ID FROM audit.alle_datensaetze;
Jaydip Jadhav
  • 12,179
  • 6
  • 24
  • 40
user3515460
  • 159
  • 1
  • 13
  • The second query is timing out. See http://stackoverflow.com/questions/10563619/error-code-2013-lost-connection-to-mysql-server-during-query or http://stackoverflow.com/questions/15712512/mysql-workbench-how-to-keep-the-connection-alive for solutions. – Adrian Lynch Feb 22 '16 at 11:31
  • First, open MySQL's error log and check if error messages are there. ('Lost connection` is not related to `lock_wait_timeout`.) – Jason Heo Feb 22 '16 at 11:35
  • Ok now i have solved the problem with the connection by setting a higher number in the preferences of MySQL. But now i getting the error 'Error Code:1024. Lock wait timeout' – user3515460 Feb 22 '16 at 11:52

0 Answers0