Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(inputs.mysql): Use tls=tlsid instead of tls=custom
Before mysql.ParseDSN(), replace "tls=custom" by "tls={tlsid}" in the DSN string so it matches the TLS Config name that was created earlier. In order to replace it, first find the last "/" (slash) symbol and split the string in two slices, the second one being the "query part". Then, on the query part, find and replace "tls=custom" by "tls={tlsid}". It is important to first split the string by the last "/" so if a username or password are "tls=custom", they are not replaced.
- Loading branch information