Warning: Using a password on the command line interface can be insecure.
[root@qttc ~]# /usr/local/mysql/bin/mysqldump -uroot -proot db > bak.sql
Warning: Using a password on the command line interface can be insecure.
翻译过来是:在命令行界面上使用密码可以是不安全的。
这让人有点郁闷,5.5用的一直都很爽,到5.6居然说命令行方式写密码不安全?那密码写哪呢?
在官网文档找到了缘由,大家可以点击这里看看:http://dev.mysql.com/doc/refman/5.1/en/password-security-user.html
MySQL users should use the following guidelines to keep passwords secure.
When you run a client program to connect to the MySQL server, it is inadvisable to specify your password in a way that exposes it to discovery by other users. The methods you can use to specify your password when you run client programs are listed here, along with an assessment of the risks of each method. In short, the safest methods are to have the client program prompt for the password or to specify the password in a properly protected option file.
英文有点烂,但大概读懂意思,翻译过来大意是在命令行下如果要使用密码可以在执行命令后的提示输入里输入密码,或者在指定的安全文件内指定密码。那安全文件时哪个呢?文档对此给出了答案:
Store your password in an option file. For example, on Unix, you can list your password in the [client] section of the .my.cnf file in your home directory:
可以在my.cnf内指定,于是打开我的my.cnf,在[mysqldump]下增加:
1
2
|
user=root password=root |
文中说的在[client]下面加也可以,但那样就所有块的操作都能共享了,所以生产环境上为了安全还是尽量分开。保存退出再dump就ok了。
[root@qttc ~]# /usr/local/mysql/bin/mysqldump db > bak.sql
[root@qttc ~]#
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 insecure
MySQL 5.6 在命令行输入密码,就会提示这些安全警告信息. Warning: Using a password on the command line interface can be inse ...
- Centos下_MysqL5.7在使用mysqldump命令备份数据库报错:mysqldump: [Warning] Using a password on the command line interface can be insecure.
在阿里云服务器增加一个shell脚本定时备份数据库脚本执行任务时,测试性的执行了备份命令,如下 [root@iZ2ze503xw2q1fftv5rhboZ mysql_bak]# /usr/local ...
- mysql 备份报错mysqldump: [Warning] Using a password on the command line interface can be insecure.
-------------------------------------------------------------------------------- mysql 备份报错mysqldump ...
- MYSQL5.7脚本运行时出现[Warning] Using a password on the command line interface can be insecure
MYSQL版本:5.7 在写linux脚本执行MYSQL命令的时候,如果使用 MYSQL="mysql -hlocalhost -P3306 -uroot -p666666" 登陆 ...
- 消除Warning: Using a password on the command line interface can be insecure的提示
最近在部署Zabbix时需要用脚本取得一些MySQL的返回参数,需要是numberic格式的,但是调用脚本时总是输出这一句: Warning: Using a password on the comm ...
- 数据库备份出现警告:Warning: Using a password on the command line interface can be insecure. Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions, even thos
1.先来看原备份数据库语句: mysqldump -h 127.0.0.1 -uroot -ppassword database > /usr/microStorage/dbbackup/cap ...
- 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报警:Warning: Using a password on the command line interface can be insecure.
问题描述:执行下面的语句,sql是执行成功了,但是出现了一个报警,报警看上去始终不舒服 mysql -hip -Pport -uuser -ppassword -e "use db;dele ...
- 解决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 ...
随机推荐
- 微信小程序开发01-小程序的执行流程是怎么样的?
前言 我们这边最近一直在做基础服务,这一切都是为了完善技术体系,这里对于前端来说便是我们需要做一个Hybrid体系,如果做App,React Native也是不错的选择,但是一定要有完善的分层: ① ...
- C#语法——消息,MVVM的核心技术。
在C#中消息有两个指向,一个指向Message,一个指向INotify.这里主要讲INotify. INotify也有人称之为[通知],不管叫消息还是通知,都是一个意思,就是传递信息. 消息的定义 I ...
- SLAM+语音机器人DIY系列:(三)感知与大脑——5.机器人大脑嵌入式主板性能对比
摘要 在我的想象中机器人首先应该能自由的走来走去,然后应该能流利的与主人对话.朝着这个理想,我准备设计一个能自由行走,并且可以与人语音对话的机器人.实现的关键是让机器人能通过传感器感知周围环境,并通过 ...
- SpringBoot系列——jar包与war包的部署
前言 Spring Boot支持传统部署和更现代的部署形式.jar跟war都支持,这里参考springboot参考手册学习记录 两种方式 jar springboot项目支持创建可执行Jar,参考手册 ...
- ajax验证用户名是否存在
jsp页面 <head> <script type="text/javascript" src="js/register.js">< ...
- Spring MVC(三)控制器获取页面请求参数以及将控制器数据传递给页面和实现重定向的方式
首先做好环境配置 在mvc.xml里进行配置 1.开启组件扫描 2.开启基于mvc的标注 3.配置试图处理器 <?xml version="1.0" encoding=&qu ...
- vue px 转rem
来自:https://www.cnblogs.com/wangqiao170/p/8652505.html 侵 删 每一个认真生活的人,都值得被认真对待 vue px转换为rem 前端开发中还原设 ...
- C# 通过KD树进行距离最近点的查找.
本文首先介绍Kd-Tree的构造方法,然后介绍Kd-Tree的搜索流程及代码实现,最后给出本人利用C#语言实现的二维KD树代码.这也是我自己动手实现的第一个树形的数据结构.理解上难免会有偏差,敬请各位 ...
- 解决在圆角手机(如小米8)上自定义Dialog无法全屏的问题
在小米8等一系列圆角的手机上测试项目时,发现我的自定义dialog无法全屏了,这时我的dialog全屏的解决方案还是和网上大部分人是一样的 Window window = getWindow(); i ...
- Netty 核心内容之 编解码器
原文链接 Netty 核心内容之 编解码器 代码仓库地址 编解码器 我认为Netty 最棒的一点就是Netty 设计的编解码链,这一优秀的设计,可以很方便的实现二进制流->ByteBuf-> ...