From 08057b2bd3b28e6d82e55358b3d14959c1c0cdc2 Mon Sep 17 00:00:00 2001 From: Ken Dilley Date: Tue, 20 Dec 2016 03:17:00 -0700 Subject: [PATCH] Update MySQL Readme to clarify connection string examples. (#2175) * Update MySQL Readme to clarify connection string examples. * Update mysql sample config to clarify connection string examples --- plugins/inputs/mysql/README.md | 4 ++-- plugins/inputs/mysql/mysql.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/inputs/mysql/README.md b/plugins/inputs/mysql/README.md index 3599b2fb8..34bb07bef 100644 --- a/plugins/inputs/mysql/README.md +++ b/plugins/inputs/mysql/README.md @@ -25,8 +25,8 @@ This plugin gathers the statistic data from MySQL server ## [username[:password]@][protocol[(address)]]/[?tls=[true|false|skip-verify]] ## see https://github.com/go-sql-driver/mysql#dsn-data-source-name ## e.g. - ## db_user:passwd@tcp(127.0.0.1:3306)/?tls=false - ## db_user@tcp(127.0.0.1:3306)/?tls=false + ## servers = ["user:passwd@tcp(127.0.0.1:3306)/?tls=false"] + ## servers = ["user@tcp(127.0.0.1:3306)/?tls=false"] # ## If no servers are specified, then localhost is used as the host. servers = ["tcp(127.0.0.1:3306)/"] diff --git a/plugins/inputs/mysql/mysql.go b/plugins/inputs/mysql/mysql.go index 5cf19f2db..54f296586 100644 --- a/plugins/inputs/mysql/mysql.go +++ b/plugins/inputs/mysql/mysql.go @@ -41,8 +41,8 @@ var sampleConfig = ` ## [username[:password]@][protocol[(address)]]/[?tls=[true|false|skip-verify]] ## see https://github.com/go-sql-driver/mysql#dsn-data-source-name ## e.g. - ## db_user:passwd@tcp(127.0.0.1:3306)/?tls=false - ## db_user@tcp(127.0.0.1:3306)/?tls=false + ## servers = ["user:passwd@tcp(127.0.0.1:3306)/?tls=false"] + ## servers = ["user@tcp(127.0.0.1:3306)/?tls=false"] # ## If no servers are specified, then localhost is used as the host. servers = ["tcp(127.0.0.1:3306)/"]