mysql connection lost in second successive query

150 views Asked by At

I have installed mysql 5.5 on a windows server and want to fetch it's data remotely.

My problem is when I send two successive query, the second one got lost connection error. when I wait something around one minutes an try again the quest successfully return results.

enter image description here

Update 1 I connect to remote database thro command line

enter image description here

Update 2: When I try to increase MySQL time out I got MySQL gone away error. enter image description here

Update 3 enter image description here

Any Idea?

1

There are 1 answers

7
r31sr4r On

By default, MySQL will wait for 10 seconds before responding with a connection timeout error.

You can increase the number to 120 seconds to wait for two minutes:

mysql -uroot -proot --connect-timeout 120

you also can change the variable values, you can use the SET GLOBAL query as shown below:

SET GLOBAL connect_timeout = 600;