Are you using the MySQL plugin as-is or are you developing the mysql plugin further?
As it stands, I do not know what state the current mysql plugin is in - its quite possible it has discovery bugs in it. We were hoping someone in the community would take it and finish it :)
I'm using it as is ... i'm a lowly sysadmin :-)
But i'm still curious what pushes things from "Process scan detected a server" to getting a key= value.
I have a feeling i need to read up on plugin development!
It is done inside of the plugin's discovery component.
In this case, the agent's plugin container has auto-detected a mysql server - and it tells the mysql plugin's discovery component about it. The discovery component needs to take that information, obtain more data about the discovered mysql server (including determining what key to use) and tell the plugin container the full details of the newly discovered server. The plugin container then sends that up to the server to show you in the auto-discovery queue for you to then commit.
Here's the mysql discovery component - again, this code was never QA'ed - I'm fairly confident it needs some work to finish it.
Here's all the classes used in the mysql plugin: