golang - gorm无法连接mysql?账号密码都对了
PHP中文网
PHP中文网 2017-04-17 16:34:00
0
2
724

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
左手右手慢动作

Solved, add the address after @
127.0.0.1

PHPzhong

The questioner was a little careless today, but I really admire the questioner’s extensive coverage

I looked at the gorm documentation out of curiosity and found that you are missing something similar to a driver class

import (
    "github.com/jinzhu/gorm"
    _ "github.com/jinzhu/gorm/dialects/mysql"
)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!