tl;dr: Every SQL query of length 64 or higher that is a multiple of 32 results in the connection closing with a 2013 error when interacting with our remote MySQL server.
I am having the strangest issue with our MySQL database. For background, it is running MySQL v5.6 on a remote server hosted by Network Solutions which our IT requires us to use. As such, privileges are really lacking. I can create, read, update, and delete databases, tables, columns, rows, etc., but I can't do things like restarting the server or defragging. I don't believe our IT has access to do so either and this is just a Network Solutions thing.
When updating some values, I noticed that some queries were causing a MySQL 2013 error which is
Lost connection to MySQL server during query.
Those queries would continue to fail on retries, and past successes would still succeed. I realized that the common factor was that the failed queries all had a total length of 64, ex.
SELECT code FROM my_database WHERE assignee = 'email@example.com'
Also noticed that it will continue to error out if the length is any other multiple of 32, except for 32 itself. The
assignee in this instance can theoretically be any length up to 50, so the query can always theoretically be a multiple of 32 no matter how I format it.
I've tried with different tables, databases, and clusters and they all have the same issue. Also tried running the queries on a different computer. Strangely, phpMyAdmin does everything just fine.
The only solution I have right now is to check assignee length and change the query accordingly so that it isn't going to fail but this is a lot of work to put in place for every single SQL statement I have written in our systems.
This might be an issue to bring up with Network Solutions but they have been extremely unhelpful in the past when it comes to technical issues and I don't even know where to start on telling them how to fix it.