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 ...
随机推荐
- shell习题第6题:监听80端口
[题目要求] 写一个脚本,判断本机的80端口(加入服务为httpd)是否开启,如果开启就什么都不做,如果发现端口不存在,那么重启一下httpd服务,并发邮件通知相关人员 [核心要点] 检测80端口使用 ...
- cookie的简单认识
1.cookie Cokie又叫会话跟踪技术,实际上就是客户端硬盘上的一个文本文件,该文件用来存储一些数据. 首先,HTTP请求时无状态的,也就是说,你打开一个网页和下一个网页之间没有任何关系,数据不 ...
- jQuery $ 的作用
$符号总体来说有两个作用: 1.作为一般函数调用:$(param) (1).参数为函数:当DOM加载完成后,执行此回调函数 $(function(){//dom加载完成后执行 //代码 }) (2). ...
- 电竞大数据平台 FunData 的系统架构演进
电竞大数据时代,数据对比赛的观赏性和专业性都起到了至关重要的作用.同样的,这也对电竞数据的丰富性与实时性提出了越来越高的要求. 电竞数据的丰富性从受众角度来看,可分为赛事.战队和玩家数据:从游戏角 ...
- ACM1012:u Calculate e
Problem Description A simple mathematical formula for e iswhere n is allowed to go to infinity. This ...
- nohup和&后台运行,进程查看及终止 详解
nohup 和重定向 功能一样,可用于定时启动 1.nohup 用途:不挂断地运行命令. 语法:nohup Command [ Arg … ] [ & ] 无论是否将 nohup 命令的输出重 ...
- 【C】对指针表达式的个人总结与思考
本文内容参考<c 和 指针>. 声明:本博文只为那些能沉得住气,认真研究,探索真知的人参考,浮躁的人请离开,因为看不懂. 感觉以前学c的时候,学的指针真是白学了,今天看到这个内容,困惑后, ...
- 20155210潘滢昊 2016-2017-2 《Java程序设计》第2周学习总结
20155210潘滢昊 2016-2017-2 <Java程序设计>第2周学习总结 教材学习内容总结 %%:表示字符串中的%. %d:以十进制整数格式输出 %f:以十进制浮点式格式输出 % ...
- 20155229--Java实验四《Android开发基础》
20155229 Java实验四<Android开发基础> 实验内容: 任务一: Android Stuidio的安装测试: 参考<Java和Android开发学习指南(第二版)(E ...
- 20155236 2016-2017-2 《Java程序设计》第三周学习总结
20155236 2016-2017-2 <Java程序设计>第三周学习总结 教材学习内容总结 1.在原始码中只能有一个公开类,且主文档名必须与公开类名称相同:其实只要有一个类定义,就会产 ...