go-gin-example icon indicating copy to clipboard operation
go-gin-example copied to clipboard

sql: unknown driver "mysql" (forgotten import?)

Open satriawinarah opened this issue 2 years ago • 1 comments

Every time I ran it, it shows sql: unknown driver "mysql" (forgotten import?)

And how to change it postgresql?

satriawinarah avatar Aug 08 '22 14:08 satriawinarah

Every time I ran it, it shows sql: unknown driver "mysql" (forgotten import?)

And how to change it postgresql?

you can add import _ "github.com/jinzhu/gorm/dialects/mysql" to fix that error

DarrenYing avatar Feb 02 '23 09:02 DarrenYing