zoukankan      html  css  js  c++  java
  • 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 警告信息 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 脚本就可以了。备份脚本中不需要涉及用户名密码相关信息。

    解决方法二:

    在home 下,创建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 statusG;"| egrep "_Running|Behind_Master" >slave.log

    改行去放羊
  • 相关阅读:
    WebGL-四之二
    WebGL-四之一
    mybatis中批量更新的问题
    nginx+tpmcat+redis实现session共享
    myeclipse快捷方式汇总
    StringBuffer的append方法比“+”高效
    《Thinking in Java》 And 《Effective Java》啃起来
    JAVA链表中迭代器的实现
    myeclipse从SVN检出项目报错
    C#中清空ListView中的数据
  • 原文地址:https://www.cnblogs.com/musen/p/11512122.html
Copyright © 2011-2022 走看看