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

最新文章

  1. MySQL:procedure, function, cursor,handler
  2. 【转】POJ题目分类推荐 (很好很有层次感)
  3. 走进AngularJs(五)自定义指令----(下)
  4. java--POI解析excel兼容性问题
  5. 【转】Oracle集合操作函数:union、intersect、minus
  6. [示例]NSPredicate基础-查询数组中负荷条件的子集
  7. UI3_CustomUITableViewCell
  8. 6,render的一些概念和可用库
  9. 360浏览器拦截弹窗,window.open方式打不开新页面
  10. Linux部署ASP.NET 5 (vNext)
  11. 深入理解extern使用方法
  12. 转载:MAT Memory Analyzer Tool使用示例
  13. f12 headers 变字典快捷方式
  14. 使用Xshell配置外网访问端口
  15. idea中springboot项目设置热部署
  16. Codeforces 596D Wilbur and Trees dp (看题解)
  17. module.export与export的区别?
  18. 使用jdk压缩war包
  19. NO--13微信小程序,左右联动
  20. python多线程练习

热门文章

  1. redis 部署方式及常见特性
  2. winform 窗体拖动
  3. zero udp
  4. PS安装失败解决方法
  5. Batch - %~dp0 vs %cd%
  6. 数字IC设计工程师成长之路
  7. Delphi 数学函数:常用的几个数学函数(Power、Abs、Int、Trunc、Round、Frac、sqr、sqrt)
  8. DOM——节点操作
  9. mysql在win系统dos 安装版配置步骤详解
  10. python中os模块获取路径的几种方式