monetdb:关闭 mclient 上的密码

monetdb: switch off password on mclient

我想在不验证密码的情况下访问 monetdb 数据库。我需要这个来将代码放入 bash 脚本并自动执行一些查询。

命令

mclient -u monetdb -d database

要求输入密码,我想省略(默认密码是 'monetdb')。执行此命令后,我想进入数据库。

如果不可行,也许有机会传递密码(即使代码中有直接可见的文本)。

我的最低要求已满足众所周知的期望命令

您可以创建一个包含您的用户名和密码的配置文件。

Before mclient starts parsing command line options, it reads a .monetdb file. If the environment variable DOTMONETDBFILE is set, it reads the file pointed to by that variable instead. When unset, mclient searches for a .monetdb file in the current working directory, and if that doesn’t exist, in the current user’s home directory. This file can contain defaults for the flags user, password, language, save_history, format, and width. For example, an entry in a .monetdb file that sets the default language for mclient to mal looks like this: language=mal. To disable reading the .monetdb file, set the variable DOTMONETDBFILE to the empty string in the environment.

将其放入您的 .monetdb 文件中,您就不必手动输入用户名和密码了。

user=monetdb
password=monetdb