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

MySQL 5.6 警告信息 command line interface can be insecure

在命令行输入密码,就会提示这些安全警告信息。

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

注: mysql -u root -pPASSWORD 或 mysqldump -u root -pPASSWORD 都会输出这样的警告信息.

1、针对mysql

mysql -u root -pPASSWORD 改成mysql -u root -p 在输入密码即可.

2、mysqldump就比较麻烦了,通常都写在scripts脚本中。

解决方法一:

对于 mysqldump 要如何避免出现(Warning: Using a password on the command line interface can be insecure.) 警告信息呢?

vim /etc/mysql/my.cnf

[mysqldump]

user=your_backup_user_name

password=your_backup_password

修改完配置文件后, 只需要执行mysqldump 脚本就可以了。备份脚本中不需要涉及用户名密码相关信息。

解决方法二:

任意创建文件件,创建。my.cnf文件 内容

[mysql]

host=172.17.22.124

user=your_backup_user_name

password=your_backup_password

执行方式  HOME=/home /data/opt/mysql/bin/mysql -e "show slave status\G;"| egrep "_Running|Behind_Master" >slave.log

Mysql: [Warning] Using a password on the command line interface can be insecure的更多相关文章

  1. 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 inter ...

  2. mysql: "Warning: Using a password on the command line interface can be insecure." 解决方法

    错误重现: 命令行或者shell脚本中执行以下命令,如果您当前服务器mysql版本是大于5.6的,则会出现警告:Warning: Using a password on the command lin ...

  3. MySQL Warning: Using a password on the command line interface can be insecure.解决办法

    转自 http://www.cnblogs.com/sunss/p/6256706.html  被一个小朋友问到,直接公布答案: If your MySQL client/server version ...

  4. mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    错误情况 解决办法: 首先查看mysql的命令 其次修改root用户的密码 set password for 'root'@'localhost' = password('123456'); 最后退出 ...

  5. MYSQL5.7脚本运行时出现[Warning] Using a password on the command line interface can be insecure

    MYSQL版本:5.7 在写linux脚本执行MYSQL命令的时候,如果使用 MYSQL="mysql -hlocalhost -P3306 -uroot -p666666" 登陆 ...

  6. 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 ...

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

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

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

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

  9. 解决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 ...

随机推荐

  1. css渐变写法 从左到右渐变三种颜色示例;

    background:linear-gradient(to right,#7f06a8,#a02bc2,#7f06a8)

  2. 装箱与拆箱(TDB)

    装箱:把值类型转换为引用类型 拆箱:把引用类型转换为值类型 只能对之前装箱的变量进行拆箱.需要强制转换.

  3. Jenkins 搭建 .NET FrameWork 持续集成环境

    本文不赘述如何安装 Jenkins,如有需要请看之前文章,这里我们主要搭建 .Net 环境.本文是在 Windows 环境下安装的 Jenkins 进行操作     一.安装所需环境     这里我们 ...

  4. 如何配置vue-cli4.0

    这是一期主要分享vue-cli4.0配置 新建一个项目,最令人为难的是配置环境.拿vue来说,创建项目很简单,跟着文档走即可,但是要知道配置本地,测试,生产环境,以及反向代理等等,如果对于一个对vue ...

  5. 单源最短路径问题2 (Dijkstra算法)

    用邻接矩阵 /* 单源最短路径问题2 (Dijkstra算法) 样例: 5 7 0 1 3 0 3 7 1 2 4 1 3 2 2 3 5 2 4 6 3 4 4 输出: [0, 3, 7, 5, 9 ...

  6. 反演+分块套分块——bzoj2154

    题解都在论文里了 #include<bits/stdc++.h> using namespace std; #define maxn 10000005 #define ll long lo ...

  7. console.log("正常-普天数据已调用");

    console.log("正常-普天数据已调用");

  8. TCP之1460MSS和1448负载

    TCP和1448 1448字节是实际场景下,单个TCP包的实际运载能力.也就是说,实际场景下,上层调用send(1000KB),下层会把这1000KB封装成多个TCP包进行发送.单个TCP包每次打包1 ...

  9. MDK(KEIL) 两步解决 中文乱码 及 中文光标 半个半个跳的问题

    1. 如果已经用MDK(KEIL)的默认设置写了好多中文,那么先用notepad把文件一一打开然后转变编码格式为 utf-8 without ROM,如下: 2. 如果还没有开始编辑,或者已经用not ...

  10. 牛客练习赛26 A 平面(结论题)

    题目链接:https://ac.nowcoder.com/acm/contest/907/A 思路:结论题,当做2n条直线,参考资料https://blog.csdn.net/qq_34131212/ ...