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

zabbix 3.4监控mysql,提示mysql: [Warning] Using a password on the command line interface can be insecure.的更多相关文章

  1. MySQL 5.6 Warning: Using a password on the command line interface can be insecure

    MySQL 5.6 在命令行输入密码,就会提示这些安全警告信息. Warning: Using a password on the command line interface can be inse ...

  2. MYSQL报警:Warning: Using a password on the command line interface can be insecure.

    问题描述:执行下面的语句,sql是执行成功了,但是出现了一个报警,报警看上去始终不舒服 mysql -hip -Pport -uuser -ppassword -e "use db;dele ...

  3. shell脚本中执行mysql 语句,去除warning using a password on the command line interface can be insecure信息

    方法二:使用mysql参数的方法 mysql -u$user -p$pass -D $db -e "select host from user;"当然,可以通过将传参的方式来传递 ...

  4. mysql处理警告 Warning: Using a password on the command line interface can be insecure.

    vim /etc/mysql/my.cnf [mysqldump] user=user_name password=password 格式: [只用密码的命令] user=用户名 password=密 ...

  5. mysql 5.7 Warning: Using a password on the command line interface can be insecure. 解决方案

    百度了好多,发现都是lunix环境下的,没有找到windows和OS 的,在lunix环境下的解决方案一般就是修改数据库配置文件 my.conf 在Windows 中是没有my.cnf 文件,而是叫做 ...

  6. 解决mysql连接输入密码提示Warning: Using a password on the command line interface can be insecure

    有时候客户端连接mysql需要指定密码时(如用zabbix监控mysql)5.6后数据库会给出个警告信息 mysql -uroot -pxxxx Warning: Using a password o ...

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

    mysql: [Warning] Using a password on the command line interface can be insecure MySQL 5.6 警告信息 comma ...

  8. mysql 备份报错mysqldump: [Warning] Using a password on the command line interface can be insecure.

    -------------------------------------------------------------------------------- mysql 备份报错mysqldump ...

  9. 【mysql报错】MySQL5.7.27报错“[Warning] Using a password on the command line interface can be insecure.”

    MySQL5.7.27报错“[Warning] Using a password on the command line interface can be insecure.”在命令行使用密码不安全警 ...

随机推荐

  1. Java知识汇总——思维导图

    转载:https://www.cnblogs.com/java1024/p/8757952.html Java知识点汇总,从基础到常用的API.还有常用的集合类,总结的很详细.图片是从论坛里面找到的, ...

  2. APP注册&登陆 逻辑细节

    前言:有多少用户愿意注册登陆,决定了一款产品的最大活跃度. 用户登陆注册系统分为两大类: 自建用户系统:邮箱/手机号/用户名/二维码/人脸识别/指纹 第三方授权用户系统:微信/微博/支付包/豆瓣/Fa ...

  3. 第四十二课 KMP算法的应用

    思考: replace图解: 程序完善: DTString.h: #ifndef DTSTRING_H #define DTSTRING_H #include "Object.h" ...

  4. swing的弹出窗口

    swing作为基础的图形化显示界面开发,还是新手小难上手的一个项目学习,当然做好了之后的数据流转是对编程架构的很大提高. 这里我介绍一下swing的弹出窗口,作为界面交互的时候不可或缺的检测工具,简直 ...

  5. 2017-2018-1 20155208 课堂测试(ch06)(补做)

    2017-2018-1 20155208 课堂测试(ch06)(补做) 1.( 多选题 | 1 分) 下面说法正确的是(ABC) A . 存储层次结构中最小的缓存是寄存器 B . 存储层次结构的中心思 ...

  6. 每天进步一点点-序列化和反序列(将对象写入硬盘文件and从硬盘文件读出对象)

    一个类如果实现了Serializable接口,那么这个类创建的对象就是所谓序列化的对象.所谓“对象序列化”: 简单一句话:使用它可以象存储文本或者数字一样简单的存储对象.一个应用是,程序在执行过程中突 ...

  7. shell-dict-uniq-count

    shell dict  #!/bin/bash result_file="a" declare -A mydict :>${result_file} total=`cat $ ...

  8. Jenkins部署项目

    第三首先部署好Jenkins 新建一个自由项目 svn地址,credentials是指认证,点击Ad那里添加,并选择username和password方式,并输入用户名和密码 H/5 * * * * ...

  9. Android 工具视频学习笔记_WDS

    1. 由于Android源码过于庞大,SourceInsight会经常卡死,不适合了.适合的是Android Studio, 非常好用.使用手册上有介绍如何安装. 编译安卓的过程说明手册中也有. 3. ...

  10. haproxy httpcheck with basic auth

    一个简单的需求,就是需要在 haproxy 的 httpcheck 使用 basic 认证,解决方法 base64 编码username 以及密码 echo -n "my_username: ...