mysql 5.6 登录 警告_MYSQL 5.6版本 mysqldump备份数据,提示警告“Using a password...”...

mysql 5.6版本之后,使用 mysqldump dbName -r - p > bs.sql 会报警告。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.

大意就是,在命令行输入密码,不安全。因此,它也给出了几个解决方案。

其中就用利用my.cnf(linux下)/my.ini(window)加入密码的写法。[client]

host=your_host

user=your_user

password=your_pass

对应的,mysqldump的备份写法是如下:mysqldump --defaults-extra-file=../my.ini dbName >dbName.sql

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值