[ Agent ] [ App ] - fix mysql init bugs - 2

This commit is contained in:
zeaslity
2023-11-28 11:05:39 +08:00
parent a639b9173c
commit 4217a2fd0d
2 changed files with 20 additions and 4 deletions

View File

@@ -7,9 +7,9 @@ import (
"os"
)
func MysqlSqlFileLoad(jackeyLoveFileList []string) (bool, []string) {
func MysqlSqlFileLoad(jackeyLoveIp string, jackeyLoveFileList []string) (bool, []string) {
dsn := "root:QzfXQhd3bQ@tcp(127.0.0.1:33306)"
dsn := "root:QzfXQhd3bQ@tcp(" + jackeyLoveIp + ":33306)"
db, err := sql.Open("mysql", dsn)
if err != nil {
errConnect := fmt.Sprintf("[MysqlSqlFileLoad]- mysql connection error ! please check ! => %s ", dsn)