Gorm cann't connect Doris
Cookiery opened this issue · comments
GORM Playground Link
Description
Gorm cann't not connect Doris
Gorm version:
gorm.io/driver/mysql v1.5.7
gorm.io/gorm v1.25.10
gorm.io/plugin/dbresolver v1.5.0
example code:
Settings.Doris.DSN = fmt.Sprintf(`%v:%v@tcp(%v)/%v?charset=utf8mb4&parseTime=True&loc=Local`,
Settings.Doris.UserName, Settings.Doris.Password, Settings.Doris.Host, Settings.Doris.DBName)
var DorisDB *gorm.DB
log.Infof("Init doris connection...")
DorisDB, err = gorm.Open(mysql.Open(config.Settings.Doris.DSN), &gorm.Config{Logger: newLogger})
if err != nil {
return fmt.Errorf("connect doris fail: %s", err.Error())
}
error: error connect doris fail: invalid connection
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question
template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
Maybe try taking a look at the mysql driver to see if there's anything missing from this.
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question
template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨