问答详情
源自:3-4 Beego框架Session&Log实践

<username>:<password>@<network-type>(<host>:<port>)/<dbname>

// 注册数据库
_ = orm.RegisterDataBase("default", "mysql",
   "root:123456@tcp(47.95.244.24:3308)/test?charset=utf8")


提问者:shang123 2020-04-05 22:09

个回答

  • luboo
    2021-03-08 17:12:09

    改成

    orm.RegisterDataBase("default","mysql","root:root@tcp(127.0.0.1:3306)/test?charset=utf8")

    就好了