zoukankan      html  css  js  c++  java
  • zabbix 3.4监控mysql,提示mysql: [Warning] Using a password on the command line interface can be insecure.

    mysql从5.6版本开始,如果是命令行直接出现了数据库连接密码就会有以下警告:

      mysql: [Warning] Using a password on the command line interface can be insecure.

    如用mysql -uroot -proot -e 'show varibles;'或echo “show full processlist "|mysql -uroot -p`cat /root/passwd`;在返回查询的结果中的第一行都有mysql: [Warning] Using a password on the command line interface can be insecure.

      如何去掉这行报警呢!其它很简单,我们弄清了它是怎么出现的就好解决了,你可以试着用管道只显示最后一行。如mysql -uroot -proot -e 'show varibles‘ | tail -n1  但好像不起作用,为什么呢!因为它是标准错误输出。加上 2>/dev/null 就可以了。

      mysql -uroot -proot -e 'show varibles’ 2>/dev/nul

  • 相关阅读:
    如何安装unidac 6.2.8 到delphi 7
    Sqoop
    Spark-PySpark sql各种内置函数
    Spark译文(三)
    Spark译文(二)
    Spark译文(一)
    YARN详解
    Spark2.X管理与开发
    Hadoop2.X管理与开发
    离线综合案例
  • 原文地址:https://www.cnblogs.com/alex-hrg/p/8651556.html
Copyright © 2011-2022 走看看