Setup mysqldump without password (in Cronjob)
Posted by: funkyfrank (179.43.144.---)
Date: August 02, 2015 12:33AM

Trying to start doing things the secure way I am now trying to run a mysqldump without putting the user password in the command itself.

BTW I DID manage to run a simple mysqldump for the first time in my life just a couple minutes ago, printing everything on screen in the cmd window with a buffer of 5000 lines and oh boy am I happy and thrilled, this stuff really works and it looks mighty fun on the cmd window, loving it!
smiling smiley smiling smiley

For the without password part I have found

stackoverflow.com/a/9293090

and

techiecorner.com/1619/how-to-setup-mysqldump-without-password-in-cronjob/

There is says to log into the server as a first step.

Obviously I did try putting the "vi ~/.my.cnf" in the cmd window I opened here: C:\wamp\bin\mysql\mysql5.6.17\bin but it says there is no "vi" command.

I think this is because this is not the server but the database, MySQL.

How do I log into the console or command window of the server please? Is there one with WAMP? I am not worried about the cronjob part for now, that I will tackle next, let's first try and see if I can get the secure password part going correctly.

You must be rotfl about the level of these questions, not so much research to do as with my other questions I guess, but hey for me this is really something I enjoy and am super happy I spend time learning this.

Many thanks Riggs! One day I need to come visit you (in the UK I think??) and buy you a round of pints, or tea, whatever you prefer, hehe.. one day...

Best Regards
Frank

Version of Operating system? Windows 7 Ultimate 64bit
Version of Wamp Server installed? 2.5 32bit
Version of Apache you are running? 2.4.9
Version of MySQL you are running? 5.6.17
Version of PHP you are running? 5.5.12
What colour is your WampManager icon? Green
Host file localhost 127.0.0.1

New to WAMP?
Read this please: [forum.wampserver.com]



Edited 1 time(s). Last edit at 08/02/2015 12:35AM by funkyfrank.

Options: ReplyQuote
Re: Setup mysqldump without password (in Cronjob)
Posted by: funkyfrank (179.43.144.---)
Date: August 02, 2015 01:57PM

This helped.

How to use Option Files on Windows

dev.mysql.com/doc/refman/5.1/en/option-files.html

dev.mysql.com/doc/refman/5.6/en/windows-create-option-file.html

superuser.com/questions/106181/equivalent-of-chmod-to-change-file-permissions-in-windows

Though I will report back if I get this (mysqldump without password) done or not.

Most posts and tuts have all info with Unix systems and none really mentioned "heads up for Windows this is a different command, or file name or what not..

OK. Back to work.

Version of Operating system? Windows 7 Ultimate 64bit
Version of Wamp Server installed? 2.5 32bit
Version of Apache you are running? 2.4.9
Version of MySQL you are running? 5.6.17
Version of PHP you are running? 5.5.12
What colour is your WampManager icon? Green
Host file localhost 127.0.0.1

New to WAMP?
Read this please: [forum.wampserver.com]



Edited 2 time(s). Last edit at 08/02/2015 02:21PM by funkyfrank.

Options: ReplyQuote
Re: Setup mysqldump without password (in Cronjob)
Posted by: funkyfrank (179.43.144.---)
Date: August 02, 2015 05:20PM

It seems that either I need CygWin or a Linux box to get these commands and functionality...

I am still also clueless where to find the "terminal" for Apache on WAMP...

Using WinSSHD server, logging on and using the terminal there did not really reap any mentionable results..

This is an uphill battle that I seem to be fighting.

Perhaps I am not seeing the forest for the trees.

What or how do you tackle regularly and securely backing up local and hosted MySQL databases?

Do you use plugins for WP or phpMyAdmin and CronJobs or SSH into the sever and run mysqldump commands from your box to the server?

I thought that I can also do this locally, but I might be all wrong..

How do you do these things? I like to set it up and then not worry about it and concentrate on designing and coding, though I am happy to learn this so that I know what to do if things go wrong. Ideally I like to back up all my clients stuff once a day to my local HDD that I have just for that. The web host also makes backups and also has off-location backups, but I also like to have backups and sync WP sites so if client wants re-design I can sync the site locally, work on it and if client likes result merge it with existing site and done.

Thanks for any input on how you do things Riggs. It seems there is any easy and fast way to do this, I am just not sure if the method or procedure I am going is the right one..

Best Regards

Version of Operating system? Windows 7 Ultimate 64bit
Version of Wamp Server installed? 2.5 32bit
Version of Apache you are running? 2.4.9
Version of MySQL you are running? 5.6.17
Version of PHP you are running? 5.5.12
What colour is your WampManager icon? Green
Host file localhost 127.0.0.1

New to WAMP?
Read this please: [forum.wampserver.com]

Options: ReplyQuote
Re: Setup mysqldump without password (in Cronjob)
Posted by: RiggsFolly (---.as43234.net)
Date: August 02, 2015 05:38PM

Please stop it with the UNIX stuff.


ITS NOT REQUIRED

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Setup mysqldump without password (in Cronjob)
Posted by: funkyfrank (179.43.144.---)
Date: August 02, 2015 06:07PM

Yeah, instead of designing and coding I think I am trying to learn sys admin stuff that noone pays me for, right?

All this is not needed, correct?

Simply use a WP plugin or SSH into webhost assign cronjobs and done, right? At least for backing up and restoring dbs.

Right?

Version of Operating system? Windows 7 Ultimate 64bit
Version of Wamp Server installed? 2.5 32bit
Version of Apache you are running? 2.4.9
Version of MySQL you are running? 5.6.17
Version of PHP you are running? 5.5.12
What colour is your WampManager icon? Green
Host file localhost 127.0.0.1

New to WAMP?
Read this please: [forum.wampserver.com]

Options: ReplyQuote


Sorry, only registered users may post in this forum.