mattes / migrate

Database migrations. CLI and Golang library.
Other
2.29k stars 326 forks source link

CLI fails with MySQL in Linux: Unknown Driver MySQL #295

Closed azer closed 7 years ago

azer commented 7 years ago

Hey there

I'm a Linux user so installed migrate without brew. (go get)

It seems like MySQL driver is missing. I'm not sure why, here is what I get when I try running:

$ migrate -database mysql://root:123456@tcp(localhost:3306)/foobar -source "file://migrations" up 
error: database driver: unknown driver mysql (forgotten import?)                                                                                                         

Am I missing something ?

mattes commented 7 years ago

Please build with -tags mysql. https://github.com/mattes/migrate/tree/master/cli#with-go-toolchain