Mysql: go-sql-driver/mysql/utils.go:81: undefined: cloneTLSConfig

Created on 5 Dec 2017  路  10Comments  路  Source: go-sql-driver/mysql

Hi,

I'm trying to use the mysql driver from go-sql-driver in order to connect a google cloud sql instance.
When I import _ "github.com/go-sql-driver/mysql" I have a error message :
go-sql-driver/mysql/utils.go:81: undefined: cloneTLSConfig

I've seen the issue in which it was said to be on go 1.8 or higher but I am on go 1.9.1 on Google app engine.

Did anyone have another solution to this problem?

Thank you iin advance

Error log

/home/admin_/gopath/src/github.com/go-sql-driver/mysql/utils.go:81: undefined: cloneTLSConfig

Configuration

Go version : go version go1.9.1 linux/amd64
Server OS : Debian 8 Jessie

Most helpful comment

That's what you should report first!

Recently, GAE changed default Go version from 1.6 to 1.8.
https://cloud.google.com/appengine/docs/standard/go/runtime

This driver is compatible with Go 1.8, but not 1.6.

All 10 comments

It seems your environment issue.
What happens when rm -rf $GOPATH and rm -rf $GOROOT and clean install them?

What happens when rm -rf $GOPATH and rm -rf $GOROOT and clean install them?

Please don't do that without backups.

Maybe rm -rf $GOPATH/pkg/github.com/go-sql-driver/mysql is already enough.

Maybe rm -rf $GOPATH/pkt/github.com/go-sql-driver/mysql is already enough.

It may not be enough if go-sql-driver/mysql is vendored in some package.

Thank you for your answers.
It does not seem to be my environment.
I'm trying to connect with annother package "github.com/ziutek/mymysql/godrv" and I don't have such an error.
I have to finish my test but it seems to be the go-sql-driver which is the problem or maybe I actually have a wrong configuration.

What's difference between "your environment problem" and "your configuration problem"?

This error is compile error and I suspect you're using old Go compiler in some way,
while you believe you're using Go 1.9.1.
Is it config problem or environment problem?

Sorry, I mean an environment problem not a configuration problem.
I have to go further. You are all right, maybe I am not using Go 1.9.1.
In fact, I'm a new user of Go.
I am using this on Google App Engine and maybe I did something wrong.
When I use "go version", it says I'm on 1.9.1 but maybe I have to use another command on app engine.
Do you have feedback about using Go on Google App Engine. Is there anything special on Google App Engine compared to another system?

That's what you should report first!

Recently, GAE changed default Go version from 1.6 to 1.8.
https://cloud.google.com/appengine/docs/standard/go/runtime

This driver is compatible with Go 1.8, but not 1.6.

Hi, I think you was right.
I have a problem with my environment.
I changed my gopath variable and now i have other errors.
I'll try to have the good paths in order to make this work and i come back.

I'm having this issue on GAE in Flexible Env with Go 1.9.1 the gopath looks good the rm -rf $GOPATH/pkg/github.com/go-sql-driver/mysql suggestion here did remove the package and i reinstalled it, but still getting that same cloneTLSConfig error, any suggestions please?

I'm not GAE user. And I don't want to learn GAE programming only for replying to question.

Please ask such question on google clouds' forum first.
If you get enough information and it really looks driver's issue, report it again.

Was this page helpful?
0 / 5 - 0 ratings