[Detailed description of the issue or question]
I want to modify the mySQL directory path of the pmm agent.
So, I want to download the source code and re-create it as a binary file after modifying it.
The binary file of the pmm agent is statically link, and I want to know how you made the go language statically link.
Steps to Reproduce:
[Step-by-step instructions on how to reproduce the issue, including any specific settings or configurations]
i downloaded pmm agent source code
here : GitHub - percona/pmm-agent: pmm-agent for PMM 2.x.
go build -o /go/bin/myapp -a -ldflags '-extldflags "-static"'
i tried this, but got this fail log, but the library below already exists in OS
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lresolv
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
[Insert the version number of the software]
[If applicable, include any relevant log files or error messages]
[What the user expected to see or happen before the issue occurred]
[What actually happened when the user encountered the issue]
[Include any additional information that could be helpful to diagnose the issue, such as browser or device information]
Did you check if there is not already a flag for this? I’ve installed PMM-Agent on many customer machines with different datadirs and I’ve never needed to custom-compile the agent. The pmm-agent for mysql should automatically pick up the changed datadir. ex:
First of all, thank you for your reply.
It is correct that the pmm-agent recognizes the changed datadir is correct.
However, there is a problem that the xtrabackup does not recognize the changed datadir when restoring and does not recognize the default datadir, /var/lib/mysql.
It was difficult to change the command in the middle because it was a pmm server that gave the command to xtrabackup, so we decided to modify the binary file.
That’s a bug. You should file that at https://jira.percona.com and provide our enginners with step-by-step of what you are doing so they can correct this in the next version of PMM.
but i cannot wait until next version…
I understand that you can’t wait, but letting our engineers know about this situation will help improve PMM for everyone in the future. For you, when the next version comes out, you won’t have to bother recompiling.
I registered the issue on jira on 10/4 with PMM-12559, but no representative has been assigned yet.
The version has also been upgraded by two levels, can you tell me when it will be patched?