Page 1 of 1 1
Topic Options
#190227 - 2008-10-21 09:50 PM how to echo a password
selormquarshie Offline
Getting the hang of it

Registered: 2006-12-24
Posts: 85
learned folk: I am running a script that i need to have the password authomatically filled in at the prompt. i am having issues figuring it out how to make this give the password at prompt without me entering it in. I need to do so to be able to use windows schedular to scedule backups
 PHP:
mysqldump -uroot -p eu_in_us > c:MySQLbackups_%DATE:~0,3%.sql echo "password"

Top
#190228 - 2008-10-21 10:22 PM Re: how to echo a password [Re: selormquarshie]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Please take a look here and see if this is helpful or not.

automatipm of MySQL backup via kix

As for setting the Scheduler there is a UDF for that as I recall from Glenn Barnas. If not there then it is on his site for sure.


Top
#190235 - 2008-10-22 09:45 AM Re: how to echo a password [Re: NTDOC]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Most versions of mysqldump use "-p" or "--password=" to provide the password.

I see that you have got "-p" in your command, but you have not specified the password - leaving the password blank forces the command to prompt for one. Make sure that you do not leave a space between the "-p" and the password.

Depending on your version of MySQL you may also supply the password in a configuration file, which may be more appropriate. See http://dev.mysql.com/doc/refman/4.1/en/password-security.html for more information.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 320 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.153 seconds in which 0.091 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org