[在linux中]linux中mydumper需要输入明文密码解决方案

更新时间:2019-07-10    来源:linux    手机版     字体:

【www.bbyears.com--linux】

在使用mydumper时,需要再命令行中输入用户名和密码,这会记录到history中,这样的话,就是相对不安全。
[root@liufofu backup]# mydumper -h localhost -u root -p tiger -c -o ./liufofu/ -B liufofu
查了下官方提供的解决方案有2种:
1、在homedir中新建一个.my.cfg,输入你的用户和密码
2、打上相应的补丁
具体可以参考官方的回复
1. Use ~/.my.cfg with your login and password to authenticate. It will both not save password in bash history and hide password if ps list, but you’ll have to keep plaintext password in your homedir.
2. Try this patch
commit 056fa3edc2a3880d35986d6f123430fde5fe292a
Author: Dmitry Ilyin

本文来源:http://www.bbyears.com/caozuoxitong/57285.html