If you are having trouble with Query Analyzer, either because the information is not being shown or the full range of queries that you expect are not appearing in the Query Analyzer page then there are a number of systems you can check.
To confirm that your system is correctly configured for Query Analysis, check the following:
Confirm that the agent is running by checking the Agent log and the status of the server within MySQL Enterprise Service Manager
Check the configuration of the agent. You must confirm the following:
The plugins
parameter within the main
configuration file,
mysql-monitor-agent.ini
, must contain
the proxy
plugin:
plugins=proxy,agent
The agent-item-files
parameter within
the main configurationfile,
mysql-monitor-agent.ini
, must specify
the share/mysql-proxy/items/quan.lua
script:
agent-item-files = share/mysql-proxy/items/quan.lua, » share/mysql-proxy/items/items-mysql-monitor.xml
The proxy configuration parameters must point to the MySQL
server where you want your queries to be sent. For
example, if you are running your agent on the same host as
your MySQL server then you might have the following lines
in your mysql-monitor-agent.ini
file:
proxy-address=:6446 proxy-backend-addresses = 127.0.0.1:3306 proxy-lua-script = share/mysql-proxy/quan.lua
The above configuration can means:
The agent/proxy will listen on the current machine,
using port 6446 (proxy-address
).
The agent/proxy will send all queries received on to
the host 127.0.0.1
on port
3306
(the standard MySQL port), as
per the proxy-backend-addresses
parameter.
You can see a sample complete configuration file
(mysql-monitor-agent.ini
), using the
127.0.0.1
as the MySQL backend server, and
reporting to a MySQL Enterprise Service Manager called
monitor
:
[mysql-proxy] plugins=proxy,agent agent-mgmt-hostname = http://agent:password@monitor:18080/heartbeat mysqld-instance-dir= etc/instances agent-item-files = share/mysql-proxy/items/quan.lua,share/mysql-proxy/items/items-mysql-monitor.xml proxy-address=:6446 proxy-backend-addresses = 127.0.0.1:3306 proxy-lua-script = share/mysql-proxy/quan.lua agent-uuid = a3113263-4993-4890-8235-cadef9617c4b log-file = mysql-monitor-agent.log pid-file=/opt/mysql/enterprise/agent/mysql-monitor-agent.pid
Confirm that you can connect through the agent proxy to your backend MySQL server. You can do this by checking with the MySQL client. You must specify the same options as you would if you were connecting to the original server, including specifying the same user and password information:
Check that your MySQL client application is configured to use the configured proxy port, instead of the real MySQL port when sending queries.
Confirm that Query Analyzer enabled for your host. For more information, see Section 9.7, “Query Analyzer Settings”.