go-mysql-server icon indicating copy to clipboard operation
go-mysql-server copied to clipboard

Not enough arguments in call to mysql.NewAuthServerStatic

Open tomasgvivo opened this issue 5 years ago • 2 comments

I get the following error after running a copy of the _example directory in my local machine.

$ cd ~/Projects/mysql_server_example
$ wget https://raw.githubusercontent.com/src-d/go-mysql-server/master/_example/main.go
$ go get github.com/src-d/go-mysql-server
$ go run main.go
# github.com/src-d/go-mysql-server/auth
src/github.com/src-d/go-mysql-server/auth/native.go:133:35: not enough arguments in call to mysql.NewAuthServerStatic
        have ()
        want (string, string, time.Duration)
src/github.com/src-d/go-mysql-server/auth/native.go:136:7: auth.Entries undefined (type *mysql.AuthServerStatic has no field or method Entries)
# github.com/src-d/go-mysql-server/sql/parse
src/github.com/src-d/go-mysql-server/sql/parse/parse.go:274:77: undefined: sqlparser.SCHEMAS

tomasgvivo avatar Jan 16 '20 18:01 tomasgvivo

You need to use go modules. I.e. clone outside of your GOPATH and then run go get

erikmuttersbach avatar Apr 26 '20 19:04 erikmuttersbach

I have the same problem. When I do what you've suggested, I get the following

go: finding modernc.org/mathutil v1.0.0
Parsing meta tags from https://modernc.org/strutil?go-get=1 (status code 200)
get "modernc.org/strutil": found meta tag get.metaImport{Prefix:"modernc.org/strutil", VCS:"git", RepoRoot:"https://gitlab.com/cznic/strutil"} at https://modernc.org/strutil?go-get=1
go: finding modernc.org/strutil v1.0.0
go: modernc.org/[email protected]: git fetch -f https://gitlab.com/cznic/strutil refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /home/awilhgdev/opt/go/pkg/mod/cache/vcs/f48599000415ab70c2f95dc7528c585820ed37ee15d27040a550487e83a41748: exit status 128:
        error: RPC failed; result=22, HTTP code = 404
        fatal: The remote end hung up unexpectedly
go: modernc.org/[email protected]: git fetch -f https://gitlab.com/cznic/mathutil refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /home/awilhgdev/opt/go/pkg/mod/cache/vcs/fb72eb2422fda47ac75ca695d44b06b82f3df3c5308e271486fca5e320879130: exit status 128:
        error: RPC failed; result=22, HTTP code = 404
        fatal: The remote end hung up unexpectedly
go: error loading module requirements

keyslapperdev avatar Jun 12 '20 00:06 keyslapperdev