Home  >  Q&A  >  body text

golang - gorm无法连接mysql?账号密码都对了

PHP中文网PHP中文网2743 days ago733

reply all(2)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 16:36:00

    Solved, add the address after @
    127.0.0.1

    reply
    0
  • PHPz

    PHPz2017-04-17 16:36:00

    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"
    )

    reply
    0
  • Cancelreply