I am trying to get a list of hosts connected to a mysql server. How can i get this? What should i do after connecting to the mysql server.
Code snippets will really help.
Also whats the best api to use to connect to mysql using c++?
I am trying to get a list of hosts connected to a mysql server. How can i get this? What should i do after connecting to the mysql server.
Code snippets will really help.
Also whats the best api to use to connect to mysql using c++?
One way you could do it is to execute the query show processlist
, which will give you a table with Id
, User
, Host
, db
, Command
, Time
, State
and Info
columns. Remember that your show processlist
query will be part of the output.