grunt-deployments icon indicating copy to clipboard operation
grunt-deployments copied to clipboard

Dump files prefixed with "Warning: Using a password on the command line interface can be insecure."

Open ghost opened this issue 11 years ago • 6 comments

Causes database imports to fail.

I'm using MySQL 5.6, which has improved security, which might be the problem.

Fixed by modifying tpls strings to set password variable:

     mysqldump: "MYSQL_PWD=<%= pass %> mysqldump -h <%= host %> -u<%= user %> <%= database %>",

     mysql: "MYSQL_PWD=<%= pass %> mysql -h <%= host %> -u <%= user %> <%= database %>",

ghost avatar Jul 30 '14 21:07 ghost

I have experiencing the same issue and this one is a great fix! Thank you.

laurnts avatar Aug 23 '14 11:08 laurnts

Great fix. @bobdye can you submit a pull request? I might fork this repo or ask for @getdave to transfer as I use it so much... I'm not sure he has the time to work on it.

jonsherrard avatar Oct 23 '14 09:10 jonsherrard

Sure. Glad to help out.

Bob Dye

Wine Country Web Design

Cell: (707) 738-9919

www.winecountrywebdesign.com

On Thu, Oct 23, 2014 at 2:01 AM, Jon Sherrard [email protected] wrote:

Great fix. @bobdye https://github.com/bobdye can you submit a pull request? I might fork this repo or ask for @getdave https://github.com/getdave to transfer as I use it so much... I'm not sure he has the time to work on it.

— Reply to this email directly or view it on GitHub https://github.com/getdave/grunt-deployments/issues/55#issuecomment-60210861 .

ghost avatar Oct 23 '14 23:10 ghost

@bobdye +1, thanks

yosukehasumi avatar Feb 07 '15 07:02 yosukehasumi

great fix, better than mine xD , i did not know about the variables, but this will not work on windows i had to change the db_dum function and add these lines after // Capture output...

// Capture output...
        var output = shell.exec(cmd, {silent: true}).output;
        // break the textblock into an array of lines
        var lines = output.split('\n');
        // remove one line, starting at the first position
        lines.splice(0,1);
        // join the array back into a single string
        output = lines.join('\n');

We should edit this once for all i thing and why not send a pull request, i will edit it by tomorrow.

mohamedpsx avatar Feb 16 '15 16:02 mohamedpsx

Thanks Bob. Fixed my issue. You'd this this fix would have been committed by now.

alexpeterson avatar Oct 19 '17 07:10 alexpeterson