3

I know this question has been asked on here before, but it seems like I've tried everything suggested in this answer and this answer, and still no luck. I'm trying to use MySQL Workbench 6.3 on a Windows 10 client, connecting to a Linux MySQL server hosted by GoDaddy/cPanel.

I can connect to the MySQL server with no problems, and usually I have time to run a query or two. Then, within a minute of inactivity between Workbench and the server, I'll run into Error 2013: Lost connection to MySQL server during query. This even happens when running the exact same query, back to back about a minute apart, as shown here (even when the original query is quick; only 0.03 seconds to run):

MySQL error`

The same problem persists when I run select sleep(60) immediately upon connecting to the MySQL Server; the connection is usually lost between 30-40 seconds into the execution of the query:

mysql erro2

I've checked the MySQL docs, but with no luck. I don't think the problem can be related to packet size, as others have suggested (since the same query will work and then fail later), and my Workbench timeout settings look okay:

enter image description here enter image description here

Anyone have any idea? The only other thing I can think of is maybe the wait_timeout variable listed in the MySQL docs needs to be increased too, but I guess that would be somewhere on the server side (some have mention my.ini) and I can't find where any MySQL Server files live in the cPanel hosting admin interface. There's a MySQL online client provided through cPanel (phpMyAdmin I think), but it's not nearly as robust and is becoming cumbersome to use. Any help would be appreciated!

Community
  • 1
  • 1
aquemini
  • 950
  • 2
  • 13
  • 32
  • It probably is the server side connection timeout, which makes sense for go daddy: otherwise they'd run out of connection slots pretty quickly if everyone left their connections open like you're doing. They need idle connections to die quickly or they quickly become massive resource drain. – erik258 Dec 31 '15 at 22:37

1 Answers1

0

I was having the same problem, using MySQL Workbench 6.3.6 on Win10 to connect to a MySQL server on a shared hosting system (Arvixe).

In addition to to the problem described by the OP (lost connection to server), I was also getting an error when attempting to import data from a prior export (similar to what is described here):

Unhandled exception: Error querying security information: Error executing 'SELECT * FROM mysql.user WHERE user = '[username]' and Host = '[host]' ORDER BY User, Host' SELECT command denied to user '[username]'@'[host]' for table 'user' SQL Error: 1142

Apparently, a bug was introduced in MySQL Workbench 6.3.5 (bug report). From the bug report:

It appears the problem arise if connecting with an user with no privileges on the mysql schema.

In other words: users connecting to a shared hosting system.

The proposed solution is to uninstall MySQL Workbench 6.3.6, and install 6.3.4 instead. (6.3.4 can be found in the archives). This solution worked for me.

Community
  • 1
  • 1
Clo Knibbe
  • 369
  • 2
  • 10