0

Hi,
This was Mysql Backup Batch Script

Script named as mysqlbackup.bat

REM [at] echo off

for /f "tokens=1" %%i in ('date /t') do set DATE_DOW=%%i

for /f "tokens=2" %%i in ('date /t') do set DATE_DAY=%%i
for /f %%i in ('echo %date_day:/=-%') do set DATE_DAY=%%i
for /f %%i in ('time /t') do set DATE_TIME=%%i
for /f %%i in ('echo %date_time::=-%') do set DATE_TIME=%%i

"C:\Program Files\xampp\mysql\bin\mysqldump" -u root -p jee > "C:\Program Files\xampp\mysql\bin\%DATE_DAY%_%DATE_TIME%_jee10.sql"


Its working fine.I have scheduled this mysqlbackup.bat file in
start -> control panel -> scheduled task ->Add ->daily.

Its all fine.Getting backup also correctly.


My main problem is:

Every time ,it asks the password to enter (while running mysqlbackup.bat file).

Can any one help me out from this.password should not ask when my script is running daily.

with regards,
santhanalakshmi.

3
Contributors
8
Replies
10
Views
8 Years
Discussion Span
Last Post by pritaeas
0

Your problem might be the space between -p and your password.

The command i use is this one

mysqldump --host=localhost --user=pritaeas --password=blergh --all-databases --single-transaction --quick
0

Your problem might be the space between -p and your password.

The command i use is this one

mysqldump --host=localhost --user=pritaeas --password=blergh --all-databases --single-transaction --quick

Hi,

I did not set any password to the mysql.Default password "no password".Please see through it

0

Hi,
I did not set any password to the mysql.Default password "no password".Please see through it

If you have no password set, then remove the "-p jee" from the command line.

0

If you have no password set, then remove the "-p jee" from the command line.

jee is the database name.

0

To clarify a little, you are getting a password prompt because you are specifying -p which is normally used as -p[password] but you are not supplying a password after the -p so it prompts you for one. Removing the -p will get rid of the prompt.

0

To clarify a little, you are getting a password prompt because you are specifying -p which is normally used as -p[password] but you are not supplying a password after the -p so it prompts you for one. Removing the -p will get rid of the prompt.

hi,
removing -p -its working fine for the root user.But at the same time ,While running Mysql Backup Batch File for the san user ,it asks password to enter.I set the password as "secret" for the san user.Please see through it and give me a valuable solution.


Thanks in advance.......................

0
"C:\Program Files\xampp\mysql\bin\mysqldump" -u san -psecret > "C:\Program Files\xampp\mysql\bin\%DATE_DAY%_%DATE_TIME%_jee10.sql"
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.