You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever trying to use v4 and MySQL 8, I get the "error: no database name". The error doesn't happen if I use the binary obtained by running go get -tags mysql github.com/golang-migrate/migrate/cmd/migrate or if I downgrade to MySQL 5.
Steps to Reproduce
Programmatically:
$ mkdir /tmp/debug
$ cd /tmp/debug
$ go mod init github.com/fsouza/debug
$ cat > debug.go
package main
import (
"os"
"github.com/golang-migrate/migrate/v4"
_ "github.com/golang-migrate/migrate/v4/database/mysql"
_ "github.com/golang-migrate/migrate/v4/source/file"
)
func main() {
const connString = "mysql://root:@tcp(127.0.0.1:3306)/whatever"
_, err := migrate.New("file://"+os.Args[1], connString)
if err != nil {
panic(err)
}
}
^-D
$ go build
$ ./debug <path to migrations>
panic: no database name
goroutine 1 [running]:
main.main()
/tmp/debug/debug.go:16 +0xc4
Expected Behavior
Migrations should run.
Migrate Version
$ cat go.mod
module github.com/fsouza/debug
go 1.12
require github.com/golang-migrate/migrate/v4 v4.1.0
Loaded Source Drivers
file (see debug.go above)
Loaded Database Drivers
mysql (see debug.go above)
Go Version
$ go version
go version devel +99e4ddd053 Tue Dec 18 00:13:58 2018 +0000 darwin/amd64
No difference with Go 1.11.4.
The text was updated successfully, but these errors were encountered:
@dhui go-sql-driver works fine with that :, but I removed it just in case and the behavior is still the same (also, migrate splits and reconstructs the DSN). Authentication is fine, migrate fails when it tries to run the command SELECT DATABASE().
Describe the Bug
Whenever trying to use v4 and MySQL 8, I get the "error: no database name". The error doesn't happen if I use the binary obtained by running
go get -tags mysql github.com/golang-migrate/migrate/cmd/migrate
or if I downgrade to MySQL 5.Steps to Reproduce
Programmatically:
Expected Behavior
Migrations should run.
Migrate Version
Loaded Source Drivers
file (see debug.go above)
Loaded Database Drivers
mysql (see debug.go above)
Go Version
No difference with Go 1.11.4.
The text was updated successfully, but these errors were encountered: