Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-5042

PMM Server can now connect to MySQL instances by specifying a UNIX socket number instead of a port number.

    XMLWordPrintable

    Details

    • Story Points:
      3
    • Epic Link:
    • Sprint:
      Platform Sprint 12, Platform Sprint 13
    • Needs Review:
      Yes
    • Needs QA:
      Yes

      Description

      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

      Use case:

      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-5011
      • 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.

      DOD: 

      Ability to connect to MySQL servers via sockets using pmm-server API.
      mysqld_exporter and QAN MySQL agents should support these connection type

      Suggested implementation:

      1. Add string parameter `socket` to pmm-managed `inventory/services/AddMySQL` and `management/mysql/Add` endpoints requests.
      2. Add extra field to services table.
      3. Make address and port fields optional and check if only one of two fields(socket, address) exists in API and DB.
      4. if `socket` is not empty DSN should use "unix" as network and should look like this `user:password@unix(/path/to/socket)/dbname`

      Discussions:

      • Do we need autoselecting of network type based on address instead of using extra param in endpoint?
        • We don't need it now

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned
                Reporter:
                lalit.choudhary Lalit Choudhary
                Votes:
                3 Vote for this issue
                Watchers:
                9 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 4 days, 1 hour, 30 minutes
                    4d 1h 30m