前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Mysql 监控2

Mysql 监控2

作者头像
franket
发布2022-06-30 00:16:12
7520
发布2022-06-30 00:16:12
举报
文章被收录于专栏:技术杂记

尝试运行一下状态收集脚本

代码语言:javascript
复制
[root@mysql-server scripts]# /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh gg 
/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh: line 35: /usr/bin/php: No such file or directory
ERROR: run the command manually to investigate the problem: /usr/bin/php -q /var/lib/zabbix/percona/scripts/ss_get_mysql_stats.php --host localhost --items gg
[root@mysql-server scripts]# 

安装依赖包

这里提示我们系统里没有安装 php ,我们给它装上,同时我们也装上 php-mysql ,它提供了php 连接 mysql 需要的DBI

代码语言:javascript
复制
[root@mysql-server scripts]# yum install php php-mysql 
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.pubyun.com
 * extras: mirrors.yun-idc.com
 * updates: mirrors.pubyun.com
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.3-46.el6_6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-46.el6_6 for package: php-5.3.3-46.el6_6.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.3.3-46.el6_6 for package: php-5.3.3-46.el6_6.x86_64
---> Package php-mysql.x86_64 0:5.3.3-46.el6_6 will be installed
--> Processing Dependency: php-pdo(x86-64) for package: php-mysql-5.3.3-46.el6_6.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: php-mysql-5.3.3-46.el6_6.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: php-mysql-5.3.3-46.el6_6.x86_64
--> Running transaction check
---> Package Percona-Server-shared-51.x86_64 0:5.1.73-rel14.12.624.rhel6 will be installed
---> Package php-cli.x86_64 0:5.3.3-46.el6_6 will be installed
---> Package php-common.x86_64 0:5.3.3-46.el6_6 will be installed
---> Package php-pdo.x86_64 0:5.3.3-46.el6_6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
 Package                          Arch           Version                           Repository                      Size
========================================================================================================================
Installing:
 php                              x86_64         5.3.3-46.el6_6                    updates                        1.1 M
 php-mysql                        x86_64         5.3.3-46.el6_6                    updates                         86 k
Installing for dependencies:
 Percona-Server-shared-51         x86_64         5.1.73-rel14.12.624.rhel6         percona-release-x86_64         2.1 M
 php-cli                          x86_64         5.3.3-46.el6_6                    updates                        2.2 M
 php-common                       x86_64         5.3.3-46.el6_6                    updates                        529 k
 php-pdo                          x86_64         5.3.3-46.el6_6                    updates                         79 k

Transaction Summary
========================================================================================================================
Install       6 Package(s)

Total download size: 6.1 M
Installed size: 19 M
Is this ok [y/N]: y
Downloading Packages:
...
...
Installed:
  php.x86_64 0:5.3.3-46.el6_6                              php-mysql.x86_64 0:5.3.3-46.el6_6                             

Dependency Installed:
  Percona-Server-shared-51.x86_64 0:5.1.73-rel14.12.624.rhel6               php-cli.x86_64 0:5.3.3-46.el6_6              
  php-common.x86_64 0:5.3.3-46.el6_6                                        php-pdo.x86_64 0:5.3.3-46.el6_6              

Complete!
[root@mysql-server scripts]#

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 安装依赖包
相关产品与服务
云数据库 SQL Server
腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档