As a PMM User I need to specify socket for mysql to be used in pmm-admin add command so that PMM uses a socket instead of port
pmm-admin add mysql .... --socket=....
Out Of Scope:
- web UI is not needed for remote instances
- Config file and reading socket from it will be implemented in
- pmm-admin command
Currently, it is not possible to add mysql instance using UNIX socket option in PMM2.
It would be good to have --socket option in PMM2 as we have in PMM1 to add mysql instance using UNIX socket.
Ability to connect to MySQL servers via sockets using pmm-server API.
mysqld_exporter and QAN MySQL agents should support these connection type
- Add string parameter `socket` to pmm-managed `inventory/services/AddMySQL` and `management/mysql/Add` endpoints requests.
- Add extra field to services table.
- Make address and port fields optional and check if only one of two fields(socket, address) exists in API and DB.
- if `socket` is not empty DSN should use "unix" as network and should look like this `user:password@unix(/path/to/socket)/dbname`
- Do we need autoselecting of network type based on address instead of using extra param in endpoint?
- We don't need it now