Provide --password option for msqldump tool
Hello Team, We were trying to dump multiple tables through 'msqldump' tool, and restoring it in different monetdb instance in a programatic way. But the difficulty here is, I do not see an option to pass the --password to 'msqldump' tool, where as it prompts for the password and accepts input from STDIN. Due to this, we are not able achieve our requirement programatically. And it would be good if -t(--table) option accepts multiple table names, through which we can dump the selected tables in a single shot. Regards, Aravind.S
Hi Aravind, providing a (plain-text) password on the command line is dangerous, and other users might then see your password in the process table. Hence, MonetDB tool do not offer that option. Instead, you can provide the password in the .monetdb file (keeping it readble only for yourself!) as described for mclient; cf., https://www.monetdb.org/Documentation/mclient-man-page Though admittedly not documented properly, Msqldump should use the .monetdb files just as mclient does. Best, Stefan ----- On Jul 14, 2015, at 4:01 PM, Aravind S Reddy aravind.reddy@altair.com wrote:
Hello Team,
We were trying to dump multiple tables through 'msqldump' tool, and restoring it in different monetdb instance in a programatic way.
But the difficulty here is, I do not see an option to pass the --password to 'msqldump' tool, where as it prompts for the password and accepts input from STDIN. Due to this, we are not able achieve our requirement programatically.
And it would be good if -t(--table) option accepts multiple table names, through which we can dump the selected tables in a single shot.
Regards,
Aravind.S
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
Stefan, Thank you for the quick reply. I have set the ENVIRONMENT variable as follows in my WINDOWS7 system and trying to run the mclient \> set DOTMONETDBFILE="c:\Program Files\MonetDB\MonetDB5\etc\.monetdb" where ".monetdb" have the following entries user=<username> password=<pwd> After this, while launching mclient i'm seeing error as below \>mclient failed to open file '(null)': Invalid argument user(win32): Any idea, whats going wrong here? Regards, Aravind.S -----Original Message----- From: users-list [mailto:users-list-bounces+aravind.reddy=altair.com@monetdb.org] On Behalf Of Stefan Manegold Sent: 14 July 2015 19:37 To: Communication channel for MonetDB users Subject: Re: Provide --password option for msqldump tool Hi Aravind, providing a (plain-text) password on the command line is dangerous, and other users might then see your password in the process table. Hence, MonetDB tool do not offer that option. Instead, you can provide the password in the .monetdb file (keeping it readble only for yourself!) as described for mclient; cf., https://www.monetdb.org/Documentation/mclient-man-page Though admittedly not documented properly, Msqldump should use the .monetdb files just as mclient does. Best, Stefan ----- On Jul 14, 2015, at 4:01 PM, Aravind S Reddy aravind.reddy@altair.com wrote:
Hello Team,
We were trying to dump multiple tables through 'msqldump' tool, and restoring it in different monetdb instance in a programatic way.
But the difficulty here is, I do not see an option to pass the --password to 'msqldump' tool, where as it prompts for the password and accepts input from STDIN. Due to this, we are not able achieve our requirement programatically.
And it would be good if -t(--table) option accepts multiple table names, through which we can dump the selected tables in a single shot.
Regards,
Aravind.S
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) | _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
Looks there is problem with the file, i'm pointing to. When i created a new .monetdb file and setting it to the path, fixed the issue. Thank you. Regards, Aravind.S -----Original Message----- From: users-list [mailto:users-list-bounces+aravind.reddy=altair.com@monetdb.org] On Behalf Of Aravind S Reddy Sent: 14 July 2015 20:03 To: Communication channel for MonetDB users Subject: RE: Provide --password option for msqldump tool Stefan, Thank you for the quick reply. I have set the ENVIRONMENT variable as follows in my WINDOWS7 system and trying to run the mclient \> set DOTMONETDBFILE="c:\Program Files\MonetDB\MonetDB5\etc\.monetdb" where ".monetdb" have the following entries user=<username> password=<pwd> After this, while launching mclient i'm seeing error as below \>mclient failed to open file '(null)': Invalid argument user(win32): Any idea, whats going wrong here? Regards, Aravind.S -----Original Message----- From: users-list [mailto:users-list-bounces+aravind.reddy=altair.com@monetdb.org] On Behalf Of Stefan Manegold Sent: 14 July 2015 19:37 To: Communication channel for MonetDB users Subject: Re: Provide --password option for msqldump tool Hi Aravind, providing a (plain-text) password on the command line is dangerous, and other users might then see your password in the process table. Hence, MonetDB tool do not offer that option. Instead, you can provide the password in the .monetdb file (keeping it readble only for yourself!) as described for mclient; cf., https://www.monetdb.org/Documentation/mclient-man-page Though admittedly not documented properly, Msqldump should use the .monetdb files just as mclient does. Best, Stefan ----- On Jul 14, 2015, at 4:01 PM, Aravind S Reddy aravind.reddy@altair.com wrote:
Hello Team,
We were trying to dump multiple tables through 'msqldump' tool, and restoring it in different monetdb instance in a programatic way.
But the difficulty here is, I do not see an option to pass the --password to 'msqldump' tool, where as it prompts for the password and accepts input from STDIN. Due to this, we are not able achieve our requirement programatically.
And it would be good if -t(--table) option accepts multiple table names, through which we can dump the selected tables in a single shot.
Regards,
Aravind.S
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) | _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
https://www.monetdb.org/Documentation/mclient-man-page
I wonder, haven't tried it with the dump utility, could you get away with
creating a textfile called .monetdb within the directory that you are using
the utility to restore the dumps. Perhaps it, like mclient, would just
read credentials and move along.
Please let me know if this works with the dumps. We use the file all the
time with mclient.
On Tue, Jul 14, 2015 at 9:01 AM, Aravind S Reddy
Hello Team,
We were trying to dump multiple tables through 'msqldump' tool, and restoring it in different monetdb instance in a programatic way.
But the difficulty here is, I do not see an option to pass the --password to 'msqldump' tool, where as it prompts for the password and accepts input from STDIN. Due to this, we are not able achieve our requirement programatically.
And it would be good if -t(--table) option accepts multiple table names, through which we can dump the selected tables in a single shot.
Regards,
Aravind.S
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 msqldump's usage of .monetdb is the same as mclient's. There are just fewer parameters that it regards (just user and password). For the next release I'll adapt the man page. On 15/07/15 22:30, Brandon Jackson wrote:
https://www.monetdb.org/Documentation/mclient-man-page
I wonder, haven't tried it with the dump utility, could you get away with creating a textfile called .monetdb within the directory that you are using the utility to restore the dumps. Perhaps it, like mclient, would just read credentials and move along.
Please let me know if this works with the dumps. We use the file all the time with mclient.
On Tue, Jul 14, 2015 at 9:01 AM, Aravind S Reddy
mailto:aravind.reddy@altair.com> wrote: Hello Team,____
__ __
We were trying to dump multiple tables through 'msqldump' tool, and restoring it in different monetdb instance in a programatic way.____
But the difficulty here is, I do not see an option to pass the --password to 'msqldump' tool, where as it prompts for the password and accepts input from STDIN. Due to this, we are not able achieve our requirement programatically.____
__ __
And it would be good if -t(--table) option accepts multiple table names, through which we can dump the selected tables in a single shot.____
__ __
Regards, ____
Aravind.S____
__ __
_______________________________________________ users-list mailing list users-list@monetdb.org mailto:users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
- -- Sjoerd Mullender -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVp2EJAAoJEISMxT6LrWYg6+sIAIJFpaj30oiN9pYxk9JozhPo 2omWGMSVFTcPOvu8FO/5CgGXezZC5B3qbYNyq/QtlAdSgIsQG+sQYc1qhvJ6NMrW d3zhyH6ms5F9heWQLgOPGi3cTGqyDpJYZIWsSYf2TqYQ/0ww2soneV7z/gthZGyl tRkEDT8fptXP8iXK/KJpg2I7S5rCRy5aUwx+GEWMoDF7k8G62mDvCwnzrDWkadnh FKG49iuOEx7ZTAliH94m7xmRJE3yuIIRmb0DRBcbKqyP7mMOTlKsGYfyiuWLRHuF I7eYyls4VZ/6X7YuHy2RDXbmu6iUd7myQa//JLSuo1YlyK4PMrDXSb68X7OhLm0= =CiaV -----END PGP SIGNATURE-----
participants (4)
-
Aravind S Reddy
-
Brandon Jackson
-
Sjoerd Mullender
-
Stefan Manegold