使用mysqldump遇到报错

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

该错误是提示mysqldump: [Warning]在命令行界面使用密码可能是不安全的。
是mysql更新至5.6以后出现的安全保护方式

主要原因这边是在shell脚本上调用了mysqldump命令

mysqldump -u root -p 111111 库名 > 路径

注释:111111是我的密码
执行shell脚本后,提示报错,脚本无法执行

解决办法

首先打开my.cnf 配置文件
不知道路径的

# whereis my
my: /etc/my.cnf

打开配置文件
在[mysqldump]下添加
user=root
password=111111

保存退出

查看效果

调用mysqldump命令时修改指令,将密码去掉

mysqldump -u root -p  库名 > 路径

此时执行脚本时,会提示输入密码

输入mysql密码即可执行成功

Using a password on the command line interface can be insecure.相关推荐

  1. mysql备份时过滤掉某些库 以及 去掉Warning: Using a password on the command line interface can be insecure.提示信息...

    在对mysql进行完整备份时使用--all-database参数 # mysqldump -u root -h localhost -p --all-database > /root/all.s ...

  2. MySQL 基准测试(mysqlslap)出现 Using a password on the command line interface can be insecure 警告

    问题描述:在使用 mysqlslap 进行基准测试时,出现警告 mysqlslap: [Warning] Using a password on the command line interface ...

  3. 已解决: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. 解决 将密码改为后 ...

  4. 登录mysql时遇到了:mysql: [Warning] Using a password on the command line interface can be insecure.

    登录mysql时遇到了:mysql: [Warning] Using a password on the command line interface can be insecure. 问题: [ro ...

  5. 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." 解决方法 参考文 ...

  6. mysql: [Warning] Using a password on the command line interface can be insecure.解决方法

    1.在使用mysql命令的时候,出现问题: https://www.cndba.cn/hbhe0316/article/22635 https://www.cndba.cn/hbhe0316/arti ...

  7. [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. 来自TMySQL用户,包括很多开发和G ...

  8. mysql: [Warning] Using a password on the command line interface can be insecure.(using password:YES)

    前段时间不知道什么原因在Linux终端中出现无法启动Mysql的情况,在Linux终端中输入 mysql -uroot -p密码 的时候出现了下面这个错误: mysql: [Warning] Usin ...

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

    MySQL5.6之后的版本在通过客户端连接或者备份时时都会有出现如下的一个警告: Warning: Using a password on the command line interface can ...

最新文章

  1. 通过脚本案例学习shell(五) 通过创建DNS脚本一步一步教你将一个普通脚本规范到一个生产环境脚本...
  2. Silverlight实例教程 – Datagrid,Dataform数据验证和ValidationSummary
  3. Selenium Webdriver——操作隐藏的元素(三)switchTo().frame()
  4. 统计子串出现次数 STL map
  5. Braess’paradox 布雷斯悖论
  6. Wmware安装Centos7教程
  7. 什么是redis缓存穿透, 缓存雪崩, 缓存击穿
  8. VB.NET 对于类型的传递按值或者按引用
  9. 3027 - Corporative Network
  10. Android Studio|简单记事本开发
  11. pdf文档动态插入水印,45度角,位于文档中央,可插入中文
  12. (转)国内外优秀的Web前端工程师
  13. YOLOv3训练自己的数据详细步骤
  14. 简单的皮肤库 Skin++
  15. 远程桌面计算机用户名,远程桌面设置及使用
  16. Python - GPA的计算
  17. 老司机的奇怪noip模拟T1-guanyu
  18. 游戏手柄计算机,电脑游戏手柄怎么设置 电脑游戏手柄设置步骤【图文】
  19. 基于JAVA线上动漫周边商城计算机毕业设计源码+数据库+lw文档+系统+部署
  20. Tabulator本地分页和远程分页

热门文章

  1. API接口之JWT设置token过期时间(二)
  2. UR机器人编译错误收集
  3. 应用于流形的卷积网络
  4. 扫描格式的pdf文件怎样进行识别
  5. javacv 视频转音频(提取视频中音频)
  6. java爬虫京东商品,Java爬虫实现爬取京东上的手机搜索页面 HttpCliient+Jsoup
  7. 区块链的希望与原罪:从金融场景谈起
  8. 神操作 | 不重启 JVM,替换掉已经加载的类,偷天换日?
  9. Apriltag编解码系统
  10. Java程序的编辑、编译、运行