8月 082018
 

 介绍

最近学习使用go语言写了一个zabbix监控mysql数据库的小工具,有如下特点:
1.使用Zabbix Agent Trapper方式(主动发送采集数据到zabbix server,类似active模式)监控mysql数据库
2.支持对密码加密,避免配置文件里出现明文密码
3.支持SHOW /*!50001 GLOBAL */ STATUS和SHOW /*!50001 GLOBAL */ VARIABLES所有指标监控!!!
4.支持mysql主从监控(默认关闭,可通过配置文件开启,mysql用户需要有SUPER或REPLICATION CLIENT权限)
5.支持自定义采集周期

源码:https://github.com/canghai908/zabbix-mymon

Continue reading »

 Posted by at 下午 10:14
2月 262013
 

You can recover MySQL database server password with following five easy steps.
Step # 1: Stop the MySQL server process.
Step # 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for password.
Step # 3: Connect to mysql server as the root user.
Step # 4: Setup new mysql root account password i.e. reset mysql password.
Step # 5: Exit and restart the MySQL server.
Here are commands you need to type for each step (login as the root user):
Step # 1 : Stop mysql service

/etc/init.d/mysql stop

Output:

Stopping MySQL database server: mysqld.

Step # 2: Start to MySQL server w/o password: Continue reading »

 Posted by at 下午 8:45