If you read the MySQL documentation, you will see that "port" is a separate configuration key from "host". Putting the port in the host is not supported.
https://dev.mysql.com/doc/refman/8.0/en/option-files.html On Mon, May 31, 2021 at 7:14 AM Dimitri Gesquiere <[email protected]> wrote: > No one? > > Op vrijdag 28 mei 2021 om 18:35:05 UTC+2 schreef Dimitri Gesquiere: > >> Is it possible to use prometheus exporter when mysql is running on a >> different >> port then 3306? When i change the /etc/.mysqld_exporter.cnf file for >> looking at another port. it still tries to connect with port 3306. changes >> i have made are. >> >> [client] >> user=mysqld_exporter >> password=apassword >> host=localhost:portnumber >> >> exporter service is running with error >> level=error msg="Error pinging mysqld: dial tcp: lookup >> localhost:45654:3306: >> > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/952f147e-9ef4-4475-afe0-c232a879b46en%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/952f147e-9ef4-4475-afe0-c232a879b46en%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CABbyFmomjqt1P_qZ0hP4udYnGT0zr3eL0jQ885%2BE%3DwW7Sxc0MA%40mail.gmail.com.

