zabbix无法连接Mysql怎么破

zabbix无法连接Mysql怎么破,第1张

zabbixCS结构监控系统前直没整理安装:安装几都要重新看目前Zabbix配置安装进行整理Zabbix配置需要web、php、mysql、gcc等支持请自行配置接我始 *** 作 *** 作范例 *** 作系统Centos5.2tarzxvfzabbix-1.6.2.tar.gzmysql-uroot-pmysql>createdatabaseszabbixmysql>GRANTALLPRIVILEGESONzabbix.*TOzabbix@localhostIDENTIFIEDBY‘zabbix’WITHGRANTOPTIONmysql>usezabbixmysql>source/usr/local/src/zabbix-1.6.2/create/schema/mysql.sqlmysql>source/usr/local/src/zabbix-1.6.2/create/data/data.sqlmysql>source/usr/local/src/zabbix-1.6.2/create/data/images_mysql.sqlcdzabbix-1.6.2./configure–prefix=/usr/local/zabbix/\//指定安装目录–enable-server\//安装server监控节点需要–enable-agent\//安装agent–with-mysql\//需要mysql支持需要指定目录–with-net-snmp//需要snmp支持需要指定目录用编译选项需要更看帮助–enable-staticBuildstaticallylinkedbinaries–enable-serverTurnonbuildofserver–enable-proxyTurnonbuildofproxyserver–enable-agentTurnonbuildofagent–enable-ipv6TurnonsupportofIPv6–with-mysql–with-oracle–with-pgsql–with-sqlite3–with-jabber–with-net-snmp–with-ucd-snmpZabbix配置客户端需执行:./configure–prefix=/usr/local/zabbix–enable-agentmake&&makeinstallZabbix配置安装程没报错基本OK接增加应端口:vi/etc/services加入zabbix_agent10050/tcp#zabbixagentzabbix_agent10050/udp#zabbixagentzabbix_trapper10051/tcp#zabbixtrapperzabbix_trapper10051/udp#zabbixtrapper复制配置文件服务启脚本cp-rfmisc/conf/opt/app/zabbix/etc-Rmisc/init.d/选择自合适自环境启脚本或者自写添加zabbix用户useraddzabbix用脚本启zabbix_serverzabbix_agentd[root@zabbix~]#ll/usr/local/zabbix/sbin/total2344-rwxr-xr-x1rootroot362581Apr1622:55zabbix_agent-rwxr-xr-x1rootroot425336Apr1622:55zabbix_agentd-rwxr-xr-x1rootroot136854Apr1622:55zabbix_get-rwxr-xr-x1rootroot163086Apr1622:55zabbix_sender-rwxr-xr-x1rootroot1284665Apr1622:55zabbix_serverZabbix配置zabbix编译目录:配置文件:mkdir/etc/zabbixcpmisc/conf/*/etc/zabbix/vifrontends/php/include/db.inc.php更改数据库相关内容:$DB_TYPE="MYSQL"$DB_SERVER="localhost"$DB_DATABASE="zabbix"$DB_USER="zabbix"$DB_PWD="zabbix"cp-rffrontends/php/var/patible)OkImageformats:PNGOkPHPTimezone:Asia/Shanghai注:gd-devel没安装web端安装应其要安装比net-snmp通yum安装便[root@zabbix~]#rpm-qa|grepgdgd-devel-2.0.33-9.4.el5_1.1gd-2.0.33-9.4.el5_1.1安装php-bcmathyum-yinstallphp-bcmath修改区Vi/etc/php.inidate.timezone=Asia/Shanghai何安装Zabbix介绍

你需要再看看你的建表语句,是不是5个字段,2个int 3个varchar var/varchar 那是必须要加引号的,对的话就看看主键,自增设置是否正确,没处理好的话就把sql语句放到mysql里运行,会反馈错误号,按理说你这个也应该有,然后根据错误号唉百度里查询,这样就可以有针对行得处理了


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/9429074.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-28
下一篇 2023-04-28

发表评论

登录后才能评论

评论列表(0条)

保存