Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Given a valid connection string, the MySQL plugin isn't working as expected #1842

Closed
brunomvsouza opened this issue Oct 3, 2016 · 1 comment · Fixed by #1891
Closed

Given a valid connection string, the MySQL plugin isn't working as expected #1842

brunomvsouza opened this issue Oct 3, 2016 · 1 comment · Fixed by #1891

Comments

@brunomvsouza
Copy link

Bug report

Relevant telegraf.conf:

[[inputs.mysql]]
  servers = ["root:Test3a#@!@tcp(10.150.1.123:3306)/"]

System info:

  • Telegraf 1.0.0
  • Ubuntu 14.04.4 LTS

Steps to reproduce:

  1. With a MySQL server configured with the given DSN string
  2. Restart the service to apply the new configuration
  3. Check the error log
  4. 💣

Expected behavior:

No errors in the error log.

Actual behavior:

Error being shown in the error log.

ERROR in input [mysql]: Errors encountered: [default addr for network 'tcp%!.(MISSING)1.123:3306%!'(MISSING) unknown]

Additional info:

The issue started after upgrading from version 0.13 to 1.0.0.

@sparrc
Copy link
Contributor

sparrc commented Oct 6, 2016

dupe of #870

@sparrc sparrc closed this as completed Oct 6, 2016
sparrc added a commit that referenced this issue Oct 12, 2016
sparrc added a commit that referenced this issue Oct 12, 2016
The MySQL DB driver has it's own DSN parsing function. Previously we
were using the url.Parse function, but this causes problems because a
valid MySQL DSN can be an invalid http URL, namely when using some
special characters in the password.

This change uses the MySQL DB driver's builtin ParseDSN function and
applies a timeout parameter natively via that.

Another benefit of this change is that we fail earlier if given an
invalid MySQL DSN.

closes #870
closes #1842
sparrc added a commit that referenced this issue Oct 12, 2016
The MySQL DB driver has it's own DSN parsing function. Previously we
were using the url.Parse function, but this causes problems because a
valid MySQL DSN can be an invalid http URL, namely when using some
special characters in the password.

This change uses the MySQL DB driver's builtin ParseDSN function and
applies a timeout parameter natively via that.

Another benefit of this change is that we fail earlier if given an
invalid MySQL DSN.

closes #870
closes #1842
sparrc added a commit that referenced this issue Oct 12, 2016
The MySQL DB driver has it's own DSN parsing function. Previously we
were using the url.Parse function, but this causes problems because a
valid MySQL DSN can be an invalid http URL, namely when using some
special characters in the password.

This change uses the MySQL DB driver's builtin ParseDSN function and
applies a timeout parameter natively via that.

Another benefit of this change is that we fail earlier if given an
invalid MySQL DSN.

closes #870
closes #1842
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants