After the API Gateway reboot the MYSQL availability metrics will report value as 0 or unavailable despite the MYSQL is up and running. After few hours, it will start reporting normally (correct status).
After adding server-public-key-path to point to the client path to the public key seems resolved the issue.
Take the following steps.
Stop the agent.
make a backup copy of MySQL\config\schema.json (save at another location).
Chnage the following string:
"jdbcUrl":"jdbc:mysql://{hostName}:{port}/{instanceName}",
To:
"jdbcUrl":"jdbc:mysql://{hostName}:{port}/{instanceName}?allowPublicKeyRetrieval=true&useSSL=false",
Start the agent