-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL 5.7 Aborted Connection - Got an error reading communication packets #556
Comments
Tested it with go version go1.7.3 darwin/amd64 Still fails. |
What is "error log"? Is it MySQL server's error log? |
Is from The curious thing is, |
Actually, |
I've tried to increase the verbosity of the MySQL logs using
and have also tried to print out any errors from the sql query directly using
But no luck yet. Running the SQL query (which I unfortunately cannot share here) within the mysql cli client, works 100%. |
Any ideas? This has totally broken our binaries. They cannot connect to a MySQL database, whether it's local nor remote. I've tried different versions of MySQL and different versions of golang (1.7.3 upwards). I've also built this on a linux machine with a fresh installed copy of Any pointers that you guys may have to fix this are much appreciated. |
|
What "but no lock yet" means? |
@methane switching log level from 2 to 3 didn't yield any more information. @julienschmidt I'll try that now and see if I can get anywhere with that. |
Do you mean same problem happened on MySQL 5.6 too? Your report lacks detail information about "what you tried and what you got." Many users uses this with MySQL 5.7. You is the only person reporting issue. |
@methane Will do. |
Problem resolved. I'm not sure how though. Recompiled the code a bunch of times with certain sections commented out. Then pushed versions with specific lines uncommented again until I found the culprit. Unfortunately, I uncommented everything one by one and it ended up working. No changes to the code. Really annoying. Thank you guys for your input and your help. @julienschmidt your idea to monitor tcpdumps was incredibly useful, thanks. |
I know this is old issue, but when I search this problem, this issue appear in search result so just don't forget to close your connection |
I've been having the exact same problem. Code works with mysql 5.6 and fails with 5.7. |
I have no trouble with MySQL 5.7. |
I'm not sure if it was the OS upgrade ( The cause seems to be our beloved strict mode. |
I solve this issue by commenting on the values of wait_timeout, interactive_timeout, connect_timeout on my mysql.sock. My warning message is stopped after commenting this lines. |
Same error with a java connection from Eclipse to MySql 5.7 on windows 10. |
Issue description
The connection to MySQL should open. However, opening this connection in Golang, results in the error (Got an error reading communication packets). Opening the MySQL connection from the cli works.
Tried:
Example code
Error log
Configuration
Driver version (or git SHA):
latest pull from go get -u github.com/go-sql-driver/mysql as of today.
Go version:
go version go1.7.5 darwin/amd64
AND
go version go1.8 darwin/amd64
Server version:
Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu)
Server OS:
Ubuntu 16.04.1
The text was updated successfully, but these errors were encountered: