MySQL监控方法

https://enterprise.mysql.com/monitoring/download.php

 

Getting Started
Here's how to get started if you have not previously installed the MySQL Enterprise Monitor:

1. Download and read the README, Getting Started Guide, and product Documentation using the links on the left.
2. Download and install a Service Manager for your operating system.
3. Download and install a Product Key and an Advisor Bundle if your Service Manager does not have internet access.
4. Download and install Agents for each of the MySQL servers you plan to monitor.
5. Consult the Getting Started Guide for installation and configuration assistance.
6. Contact MySQL Technical Support if you run into any installation or configuration questions or issues.
7. Don't forget to Change Your Password to something easy to remember.

If you have previously installed the MySQL Enterprise Monitor, see the README for more information on upgrading your current implementation.

 

下载的时候,也要下载Product Key,安装完后注册的时候需要。

配置 Query Analyzer 的时候需要注意以下几点:

Generally, changing your application is the easiest and recommended method. For example, given a typical structure like the one shown in the figure below, the client application would need to be modified so that it no longer communicated directly with the MySQL server, but to the agent.

Figure 9.2. Standard agent/monitor topology

Standard agent/monitor topology

You can see an example of the stucture when communicating via the agent below.

Figure 9.3. Query Analyzer agent/monitor topology

Query Analyzer agent/monitor             topology

To enable query analyzer within your application:

  1. Make sure that the MySQL Enterprise Service Manager and your MySQL Enterprise Service Agent are configured and running.

  2. Confirm the configuration of your agent by examining the contents of the etc/mysql-monitor-agent.ini file within your installed Agent directory.

    Queries will be sent to the host specified in the proxy-backend-addresses parameter, and the agent will listen for connections to be redirected to the server on the hostname and port configured in the proxy-address parameter.

  3. Now modify your client application to communicate with the address specified in the proxy-address parameter.

    Alternatively, if you do not want to modify your application directly, you can use iptables or firewall rules to redirect queries from the original host/port combination to the agent's port.

    Because connections to the MySQL server will be coming from the agent, not the original host, the user credentials used must be have a suitable GRANT statement for connections from localhost , or the host on which the agent is executing. The username and password information will be passed on directly through the agent from the client to the server.

  4. Confirm that your application still operates normally. There should be no difference between communicating directly with the MySQL server and communicating via the agent.

Note

If you are using the mysql client to connect to the agent and your backend servers, make sure that you are communicating with the proxy over the right port. By default, if you specify localhost as the hostname, then mysql will connect using the local Unix domain socket, rather than the TCP/IP socket.

You can enforce mysql to use the right port either by explicitly requesting the protocol type, or by using the IP address rather than localhost . For example, both of these command lines will start the client using t6he right protocol:

shell> mysql --port=4040 --protocol=tcp
shell> mysql --port=4040 --host=127.0.0.1

Note

It is recommended that you use one agent per MySQL server instance. The agent is not able to forward queries to multiple MySQL server backends.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值