pull/455/head
wangchuxiao 2 years ago committed by Xinwei Xiong(cubxxw-openim)
parent b82062ff54
commit d04133c042

@ -17,6 +17,7 @@ type mysqlDB struct {
} }
func initMysqlDB() { func initMysqlDB() {
fmt.Println("init mysqlDB start")
//When there is no open IM database, connect to the mysql built-in database to create openIM database //When there is no open IM database, connect to the mysql built-in database to create openIM database
dsn := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local", dsn := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local",
config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], "mysql") config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], "mysql")

Loading…
Cancel
Save