对于mysqldump的命令窗口的批处理文件 [英] windows batch file for mysqldump command
问题描述
这是我第一次做高达Windows批处理file.I希望不要做实验至上为生活相关的服务器。
我用下面来备份MySQL数据库
打开CMD
写
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
然后CMD问密码
then cmd ask password
password = password
我要让Windows批处理文件,在点击我要执行上述功能。
任何一个可以请给一些指导.bat文件相关的脚本
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
推荐答案
的单行:
的mysqldump -u用户-p数据库名称 - 密码你的密码> C:\\ DBname.sql
应该这样做。
这篇关于对于mysqldump的命令窗口的批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!