In short notation: (check spaces well)
@echo off
mysqldump -h localhost -u root -pDotado256 sixstar_almacen > AlmacenBeta_19082018.sql
Pause
Extended Notation ( --result-file
is for windows not to save the file in UTF-16 or replace the \n
with \r\n
)
@echo off
mysqldump --host=localhost --user=root -password=Dotado256 --databases sixstar_almacen --result-file=AlmacenBeta_19082018.sql
Pause
You may have to change localhost
by 127.0.0.1
if the user's permissions are by ip and not by wildcard.
If the output file includes spaces, enclose it in double quotes:
"AlmacenBeta 19082018.sql"
Usually Xampp installs the mysql binaries in
C:\xampp\mysql\bin
So an example with that route would be:
C:\xampp\mysql\bin\mysqldump.exe -h localhost -u root -pDotado256 sixstar_almacen > "AlmacenBeta_19082018.sql"
the sql file is going to record it where the batch is executed (if the desktop is going to leave it there) so you can also put the full path to the wave file: "C:\AlmacenBeta_19082018.sql"
.
- In several versions of windows (you should try typing a
SET
in a command line CMD
to see if it exits) you can put "%USERPROFILE%\Documents\AlmacenBeta_19082018.sql"
to be recorded in your user's documents folder ( Documents
it can be Mis Documentos
in Spanish versions but I think there is a symlink that takes it the same)