diff --git a/db/db.go b/db/db.go index f4d87d4..73b62cc 100644 --- a/db/db.go +++ b/db/db.go @@ -25,14 +25,12 @@ import ( _ "github.com/go-sql-driver/mysql" ) -var ( - handle *sql.DB -) +var handle *sql.DB func Init(username, password, protocol, address, database string) error { var err error - handle, err = sql.Open("mysql", username+":"+password+"@"+protocol+"("+address+":13306)/"+database) + handle, err = sql.Open("mysql", username+":"+password+"@"+protocol+"("+address+":3306)/"+database) if err != nil { return fmt.Errorf("failed to open database connection: %s", err) }