Warning: Using a password on the command line inte

编程入门 行业动态 更新时间:2024-10-22 08:42:48

Warning: Using a <a href=https://www.elefans.com/category/jswz/34/1765976.html style=password on the command line inte"/>

Warning: Using a password on the command line inte

使用zabbix自带模板对mysql进行监控时,发现mysql5.6以上版本在使用mysqladmin时会发出警告:“Warning: Using a password on the command line interface can be insecure.” 。这样zabbix服务端获取数值的时候,会带有该字符串,导致报错。

最后实验成功的方法是:将mysqladmin的警告信息重定向到/dev/null,忽略掉告警信息。

Com_select)

    result=`/usr/bin/mysqladmin -u$MYSQL_USER -h$MYSQL_HOST -p${MYSQL_PWD} -S $MYSQL_SOCK extended-status  2>/dev/null|grep -w "Com_select"|cut -d"|" -f3`echo $result;;

在原有命令中加上2>/dev/null 就行了。

转载于:

更多推荐

Warning: Using a password on the command line inte

本文发布于:2024-03-05 05:04:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1711378.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:password   Warning   command   inte   line

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!