From 0506f5cd503e43cecfe4869144e5fc4c584f437e Mon Sep 17 00:00:00 2001 From: Yuvraj Date: Fri, 24 Jan 2020 23:21:23 +0530 Subject: [PATCH] Add escape and quote to mysql password Signed-off-by: Yuvraj --- go/vt/mysqlctl/mysqld.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go/vt/mysqlctl/mysqld.go b/go/vt/mysqlctl/mysqld.go index 0133e850bca..daead198112 100644 --- a/go/vt/mysqlctl/mysqld.go +++ b/go/vt/mysqlctl/mysqld.go @@ -1059,6 +1059,7 @@ func (mysqld *Mysqld) executeMysqlScript(connParams *mysql.ConnParams, sql io.Re // 'defer os.Remove()' statement. func (mysqld *Mysqld) defaultsExtraFile(connParams *mysql.ConnParams) (string, error) { var contents string + connParams.Pass = strings.Replace(connParams.Pass, "#", "\\#", -1) if connParams.UnixSocket == "" { contents = fmt.Sprintf(` [client]