this is first time I am upto making a windows batch file.I wish not to do experiments first as its related to live server. I use to back up mySql database by following open cmd write
mysqldump -u user -p DBname >C:\DBname.sql
then cmd ask password
password = password
I want to make a windows batch file ,upon click I wish to perform the above functionality. Can any one please give some instructions related script of .bat file
So far I wrote this
ECHO OFF
mysqldump -u user -p DBname >C:\DBname.sql
GO
SET password = password
Go
but still it prompts me for password . I wish password get enter automatically
The above was still prompting me for a password I used whats below to get it to work correctly.
"C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\mysqldump.exe" -uroot -pDBPass DBName > C:\DBname.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With