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 ...
随机推荐
- Java操作Redis(一)
一.创建项目,导入依赖 <dependency> <groupId>redis.clients</groupId> <artifactId>jedis& ...
- JavaScript入门学习(1)
<html> <script type ="text/javascript"> var i,j; for (i=1;i<10;i++){ for (j ...
- 使用jenkins中遇到的问题汇总/持续更新
jenkins产生大量日志文件 question: [DNSQuestion@1446063419 type: TYPE_IGNORE index 0, class: CLASS_UNKNOWN in ...
- Vue2.5入门-3
安装和使用 全局安装vue npm install --global vue-cli 创建基于webpack模板的新项目 vue init webpack my-project 安装依赖 cd my- ...
- 第13届景驰-埃森哲杯广东工业大学ACM程序设计大赛--J-强迫症的序列
链接:https://www.nowcoder.com/acm/contest/90/J 来源:牛客网 1.题目描述 牛客网是IT求职神器,提供海量C++.JAVA.前端等职业笔试题库,在线进行百度阿 ...
- Simulating Mouse Events in JavaScript
http://marcgrabanski.com/simulating-mouse-click-events-in-javascript/
- Linux下IPC机制
Linux下IPC机制 实践要求 研究Linux下IPC机制:原理,优缺点,每种机制至少给一个示例,提交研究博客的链接 共享内存 管道 FIFO 信号 消息队列 IPC 进程间通信(IPC,Inter ...
- 20145209 实验二 《Java面向对象程序设计》 实验报告
20145209 实验二 <Java面向对象程序设计> 实验报告 实验内容 1.初步掌握单元测试和TDD. 2.理解并掌握面向对象三要素:封装.继承.多态. 3.初步掌握UML建模. 4. ...
- vim 多个文件切换
打开多个文件:1.vim还没有启动的时候:在终端里输入 vim file1 file2 ... filen便可以打开所有想要打开的文件2.vim已经启动输入:open file可以再打开一个文件,并且 ...
- BZOJ1010_玩具装箱toy_KEY
题目传送门 这道题可以很快想到暴力DP的做法: f[i]=min(f[i],f[j]+(C[i]-C[j]+i-j--L)^); 但是数据范围有50000,这就需要用斜率优化了. 我们设S[i]=C[ ...