Closed
Description
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:
- Increasing the wait_time
- Increasing the connection_time
- Increasing the max packet size
Example code
func open_mysql(Host *string, Username *string, Password *string, Database *string, parameters string) *sql.DB {
open, err := sql.Open("mysql", *Username+":"+*Password+"@tcp("+*Host+")/"+*Database+parameters)
if err != nil {
log.Printf("%s\n", err)
}
return open
}
Error log
[Note] Aborted connection 13086 to db: '<redacted>' user: '<redacted>' host: '<redacted but not localhost, outside network connection>' (Got an error reading communication packets)
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