Zabbix self-template monitoring MySQL

Source: Internet
Author: User
Tags mysql client

1, configure the MySQL client, create a user to get MySQL data, use the MySQL account password to log into the database,

 > grant all on *.* to [email protected]‘localhost‘ identified by ‘123456789‘;


I am testing the environment with all for authorization, if you want to control the account permissions can use the following command, grant usage on the . to [email protected] ' localhost ' identified by ' 123456789 ';
Refreshing the database

2. After setting up the account, create a new/etc/zabbix/etc/.my.cnf on the monitored side to provide the Zabbix agent access to the database, similar to the following:
Vim/etc/zabbix//etc/.my.cnf
[MySQL]
Host=localhost
User=zabbix
password=123456789
Socket=/tmp/mysql.sock
[Mysqladmin]
Host=localhost
User=zabbix
password=123456789
Socket=/tmp/mysql.sock

 注:agent安装路径/etc/zabbix/,etc目录若不存在,需要自已创建,创建.my.cnf,为隐藏文件。

3. Modify the MySQL path/etc/zabbix/zabbix_agentd.d in the template, complete the following three directories, Home=/etc/zabbix/etc/usr/local/mysql/bin/mysqladmin
#vim userparameter_mysql.conf

4. Restart Agent Service
#service zabbix-agent Restart

5,zabbix-web settings

6. View the monitored MySQL data graph

Zabbix self-template monitoring MySQL

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.