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

Cannot user MySQL #25

Open
bcodus opened this issue Nov 4, 2021 · 0 comments
Open

Cannot user MySQL #25

bcodus opened this issue Nov 4, 2021 · 0 comments
Assignees

Comments

@bcodus
Copy link

bcodus commented Nov 4, 2021

Describe the bug
I'd like to use my local mysql instead of Docker postgresql, so I used this in local.yml:

dsn: "mysql://127.0.0.1:3306/mydb?sslmode=disable&user=myuser&password=mypassword"
To Reproduce
Steps to reproduce the behavior:

  1. At make run I get this error:
make run
go run -ldflags "-X main.Version=v1.0.1-5-gc310133-dirty" cmd/server/main.go
{"level":"error","ts":1636005794.9442818,"caller":"server/main.go:47","msg":"sql: unknown driver \"mysql\" (forgotten import?)","version":"v1.0.1-5-gc310133-dirty","stacktrace":"main.main\n\t/home/pc/go/src/go-rest-api/cmd/server/main.go:47\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203"}
exit status 255
Makefile:34: recipe for target 'run' failed
make: *** [run] Error 1

Expected behavior
Expect a clear documenation or hint on how to switch DB

Environment (please complete the following information):

  • OS: Ubuntu Linux
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

2 participants