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=:4040 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 4040 (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=:4040 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:
shell> mysql -h 127.0.0.1 --port 4040 --user=root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 299239 Server version: 5.0.60-log Gentoo Linux mysql-5.0.60-r1 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
shell> mysql -h 127.0.0.1 --port 6446 --user=root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 299239 Server version: 5.0.60-log Gentoo Linux mysql-5.0.60-r1 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
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 15.9.6, “Query Analyzer Settings”.
User Comments
Add your own comment.