From aaa53075f3635e728ca724ca526a742b153afe60 Mon Sep 17 00:00:00 2001 From: a7458969 <290198252@qq.com> Date: Mon, 10 Feb 2020 21:47:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E9=83=A8=E7=BD=B2=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/sqlManager.go | 3 +++ deploy.bat | 14 -------------- 2 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 deploy.bat diff --git a/db/sqlManager.go b/db/sqlManager.go index 4a94e14..d94cfac 100644 --- a/db/sqlManager.go +++ b/db/sqlManager.go @@ -36,6 +36,9 @@ func initMysql(mysqlconf *config.MysqlConfig) *sql.DB { cnn := fmt.Sprintf("%s:%s@tcp(%s:3306)/%s?charset=utf8", mysqlconf.UserName, mysqlconf.Password, mysqlconf.Addr, mysqlconf.Db) log.Print("Connect to mysql " + cnn) + + //db := mysql.New(proto, "", addr, user, pass, dbname) + _db, err := sql.Open("mysql", cnn) if err != nil { fmt.Println("connect sql server ", err.Error()) diff --git a/deploy.bat b/deploy.bat deleted file mode 100644 index a74f768..0000000 --- a/deploy.bat +++ /dev/null @@ -1,14 +0,0 @@ -SET CGO_ENABLED=0 -SET GOOS=linux -SET GOARCH=amd64 -go build ./ - - -ssh -t -i ./id_rsa ubuntu@118.24.238.198 'rm /home/ubuntu/api/bin/userapi' - -scp -i ./id_rsa background ubuntu@118.24.238.198:/home/ubuntu/api/bin/userapi -scp -i ./id_rsa user.yaml ubuntu@118.24.238.198:/home/ubuntu/api/bin/user.yaml - -scp -i ./id_rsa pem/ca.pem ubuntu@118.24.238.198:/home/ubuntu/api/bin/pem/ca.pem -scp -i ./id_rsa pem/client-cert.pem ubuntu@118.24.238.198:/home/ubuntu/api/bin/pem/client-cert.pem -scp -i ./id_rsa pem/client-key.pem ubuntu@118.24.238.198:/home/ubuntu/api/bin/pem/client-key.pem \ No newline at end of file