蓝盟诗人[LUC]蓝客联盟

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

2018-03-26 10:24 作者: 来源: 本站 浏览: 1,718 views 我要评论 字号:

一、概述

在mysql5.6中,shell下使用mysqldump会遇到需要输入密码,即使你带了-u -p参数。

[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]Warning: Using a password on the command line interface can be insecure.

三、解决方法

vi  /etc/my.cnf

在 [mysqldump]处,添加user=youruser和password=yourpassword

如果mysqldump要备份多个数据库的话,此处的user要同时拥有这几个库的权限。

 

打印
分享到:
复制链接

发表评论

*

* (保密)

Ctrl+Enter 快捷回复

会员登录关闭

记住我 忘记密码

注册会员关闭

小提示: 您的密码会通过填写的"电子邮箱"发送给您.