how to do bat file mysql -


i have code how mysql bat file backup, code.

@echo off echo starting backup of mysql database on server  /f "tokens=2-4 delims=/ " %%a in ('date /t') (set dt=%%c-%%a-%%b) /f "tokens=1-4 delims=:." %%a in ('echo %time%') (set tm=%%a%%b%%c%%d) set bkupfilename=%1 %dt% %tm%.sql echo backing file: %bkupfilename% mysqldump -p 3306 -h 192.168.0.1 -u root -p 123456   bayanat>c:\mysql_daily_backups\"bayanat%bkupfilename%" 

port must -p not -p (--port=port_num, -p port_num) , no space between -p , password

<-- snip --> mysqldump -alv -p 3306 -h 192.168.0.1 -u root -p123456 bayanat 2> c:\mysql_daily_backups\output.log >c:\mysql_daily_backups\"bayanat%bkupfilename%" 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -