Skip to content
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 up show database driver: unknown driver mysql (forgotten import?) #1203

Open
bramble555 opened this issue Dec 7, 2024 · 0 comments
Open

Comments

@bramble555
Copy link

bramble555 commented Dec 7, 2024

Describe the Bug

  1. I ran migrate with the following options 'migrate -path migration -database "mysql://root:123456@tcp(127.0.0.1:3306)/t?t?multiStatements=true" up'
  2. See error: "database driver: unknown driver mysql (forgotten import?)"

Migrate Version
v4.18.1

Go Version
go1.23.3 windows/amd64

supplement
1 month ago, I can run it successfully. But now, it show error.

import (
	"database/sql"
	"fmt"
	"log"

	_ "github.com/go-sql-driver/mysql"
	"github.com/golang-migrate/migrate/v4"
	"github.com/golang-migrate/migrate/v4/database/mysql"
	_ "github.com/golang-migrate/migrate/v4/source/file"
	_ "github.com/mattes/migrate/source/file"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant