Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我喜欢 Vim,喜欢所有不同的插件,而 dbext 就是其中之一
但是对密码在命令行上显示为明文这一事实不满意
有没有办法配置 dbext 以便从文件中读取密码?
是的,有而且很容易做到
我尝试了以下,它对我有用,这是我的 Mysql 个人资料之一
let g:dbext_default_profile_live_export = 'type=MYSQL:user=clear:passwd=`cat /Users/username/src/test/pw.txt`:dbname=abc
定义连接时,只需“cat”文件包含密码即可。
现在,我不再需要担心其他人从命令行看到我的 mysql 用户密码了。