Menu

#31 Warning: Using a password on the command line interface can be insecure.

v1.0 (example)
open
nobody
None
5
2017-11-29
2015-04-02
gibo
No

Latest MySQL CLI introduced this warning message.

You should provide other options to authenticate.

See http://stackoverflow.com/questions/20751352/suppress-warning-messages-using-mysql-from-within-terminal-but-password-written

Discussion

  • Jeff Rule

    Jeff Rule - 2015-06-04

    This is my vote for first to get fixed. I have been looking at these error messages for the last 6 months to a year and I really would like them to go away. I think the easiest would be to add variables to support these two command line options..

    --defaults-group-suffix=str
    --defaults-file=file_name

    And possibly a generic config file option that says authorize_using_dot_my_cnf=yes

    With that set you would stop supplying the password (and optionally user) on the command line to mysqldump and you would cause mysql to pick and use the normal ./my.cnf [client] group settings.

    adding support for --defaults-file=file_name allows users to configure an alternate file to .my.cnf file.

    adding support for the --defaults-group-suffix=str lets users use a different group for instance if you configure --defaults-group-suffix=automysql mysqldump will look for a client group called [client_automysql] in the configured .my.cnf or .my.cnf_alternate file specified with the --defaults-file option.

    I like having a single .my.cnf file with different entries for different applications but others might prefer the option of just using different config files for each application.

     

    Last edit: Jeff Rule 2015-06-04
  • larsen255

    larsen255 - 2016-06-15

    Same problem here. Attached is a patch with a workaround.

     
  • Anthony

    Anthony - 2016-09-02

    The patch is only a supression of the warning. That is not a good solution.

    While I am not using version 3.0 I am using v2.5 of this script, which is a lot simplier, I did fix it to use a pre-prepared "--login-path=automysqlbackup", which reads the user/password/host information from a
    "$HOME/.mylogin.cnf" file. This means the basic configuration does not even need to be in the script at all. However you do need to ensure $HOME is set appropritally for mysql to find that file.

    ASIDE: STOP using tabs! and please format the source for the traditional 80 character terminals.
    As it stands the script is very hard to follow!

     
  • larsen255

    larsen255 - 2016-09-02

    I never said it was a solution. I clearly stated this to be a workaround.
    Tabs vs. spaces is more of a philosophical question, but you should STOP USING CAPS...

    And perhaps you should post your solution as a patch to help other people. What about that?

     
  • Nganine Muchanga

    Please explain how to use the patch.
    TIA

     
  • larsen255

    larsen255 - 2017-11-26

    See the manpage of patch please

     
  • Nganine Muchanga

    Sorry, didn't find any manpage.

     
  • larsen255

    larsen255 - 2017-11-28
     
  • Nganine Muchanga

    So laconic... Thank you anyway. I got there. Never applied a pach to a script before.

     
  • larsen255

    larsen255 - 2017-11-29

    You seem to think that others should present a solution to your problem on a silver platter. Gotta do your homework first! Would have been much quicker, too.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.