MYSQL报警:Warning: Using a password on the command line interface can be insecure.
问题描述:执行下面的语句,sql是执行成功了,但是出现了一个报警,报警看上去始终不舒服
mysql -hip -Pport -uuser -ppassword -e "use db;delete from tb;";
Warning: Using a password on the command line interface can be insecure.
解决方法:报警的意思是“在命令行输入密码是不安全的”,解决方法是将用户名和密码写入配置文件,然后在命令行用参数的形式引入文件
.config文件内容如下:
[mysql]
user=abc
password=abc123
mysql --defaults-extra-file=~/.config -hip -Pport -e "use db;delete from tb;";
如果.config文件中的user、password均正确,那么上面的sql会执行成功,并且没有任何报警。
附:可以变动的地方及注意点
1、.config文件中的第一行除了可以是[mysql],还可以是[client]。
2、.config文件中除了password是必须的其他参数都是可选的,可以写在配置文件中,也可以写在命令行中。
3、--defaults-extra-file参数必须放在第一位。
4、当mysql或mysqldump使用遇到困难时,除了可以问旁边的大神,还可以用mysql --help来帮助解决问题。
MYSQL报警:Warning: Using a password on the command line interface can be insecure.的更多相关文章
- 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 ...
- 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 ...
- mysql 备份报错mysqldump: [Warning] Using a password on the command line interface can be insecure.
-------------------------------------------------------------------------------- mysql 备份报错mysqldump ...
- 解决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 ...
- 【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.”在命令行使用密码不安全警 ...
- 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 ...
- 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 ...
- 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 ...
- Centos下_MysqL5.7在使用mysqldump命令备份数据库报错:mysqldump: [Warning] Using a password on the command line interface can be insecure.
在阿里云服务器增加一个shell脚本定时备份数据库脚本执行任务时,测试性的执行了备份命令,如下 [root@iZ2ze503xw2q1fftv5rhboZ mysql_bak]# /usr/local ...
随机推荐
- ztz11的noip模拟赛T1:愤怒的XiaoX
链接: https://www.luogu.org/problemnew/show/U47231 思路: 这道题其实就是一道双Lazy线段树裸题 因为我们知道,当k一定时,取反偶数次最后k位等于不取反 ...
- 重写UICollectionViewFlowLayout报cache mismatched frame警告
在重写UICollectionViewFlowLayout的时候会有很多坑,比如: Logging only once for UICollectionViewFlowLayout cache mis ...
- 将Vue插件发布到npm的完整记录
前言 面对越来越多的组件库,越开越多的ui库,学会发布库已经是前端必须会的事情了,也算是为开源贡献一份力量,在网络上看了一些前者的文章,也算的发布成功了,虽然还存在很多问题,路不积跬步,无以至千里 ...
- python学习_条件判断语句_if
#条件判断语句(if)#语法:if条件表达式:语句# 代码块#执行流程:if语句在执行时,会先对条件表达式进行求值判断#如果为True,则执行if后面的语句#如果为False,则不执行#默认情况下,i ...
- R语言学习笔记(二十四):plyr包的用法
plyr 这个包,提供了一组规范的数据结构转换形式. Input/Output list data frame array list llply() ldply() laply() data fram ...
- # 20155222卢梓杰 2016-2017-2 《Java程序设计》第2周学习总结
20155222卢梓杰 2016-2017-2 <Java程序设计>第2周学习总结 教材学习内容总结 数据类型 所占字节数 short整数 2 int整数 4 long整数 8 float ...
- 20155320 《Java程序设计》实验三 敏捷开发与XP实践
20155320 <Java程序设计>实验三 敏捷开发与XP实践 实验内容 XP基础 XP核心实践 相关工具 (一)研究一下Code菜单 具体内容: 在IDEA中使用工具(Code-> ...
- 【LG3237】[HNOI2014]米特运输
题面 洛谷 题解 代码 #include <iostream> #include <cstdio> #include <cstdlib> #include < ...
- ELKStack入门篇(二)之Nginx、Tomcat、Java日志收集以及TCP收集日志使用
1.收集Nginx的json格式日志 1.1.Nginx安装 [root@linux-node1 ~]# yum install nginx -y [root@linux-node1 ~]# vim ...
- Drupal8 Console 命令行工具
转载:https://yplam.com/post/79 Drupal Console 是面向Drupal 8 的一套命令行工具,用来生成Drupal 8模板代码,并且可以跟Drupal 8应用进行交 ...