Re: Mysql Command Line Client ARRGH
James,
You need a password with the -p, with no space between the -p and password, like this -ppassword.
You need to specify a database to dump --databases db1
The result-file needs to use forward slashes, or two backslashes.
--result-file="e:/xyz.sql" or --result-file="e:\\xyz.sql"
Try this line.
>mysqldump --opt -uroot -ppassword --databases dbname --result-file="e:/xyz.sql"
Use your own username and password and database name.
It works as expected on my machine.
Here's a bat file I run as a scheduled task to dump my databases.
The output file name is built with date and time, so I can have more than one of them.
@echo off
for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
for /f "tokens=1" %%u in ('time /t') do set t=%%u
if "%t:~1,1%"==":" set t=0%t%
rem set timestr=%d:~6,4%%d:~3,2%%d:~0,2%%t:~0,2%%t:~3,2%
set datestr=%d:~6,4%%d:~3,2%%d:~0,2%
set timestr=%t:~0,2%%t:~3,2%
mysqldump -uroot -ppassword --result-file="d:/all_backup "%datestr%" "%timestr%".sql" --all-databases
BTW, Do I detect an Aussie accent there?
Crikey mate!
Good luck,
Barry.