I am a MySQL novice but need to schedule a task to automatically back up my databases.
I have managed to create a backup manually using the following command :-
mysqldump -u root -p --all-databases > "a:\mysql\all_databases.sql"
But I cannot work out how to run the command without having to manually enter my password. I have tried:--
mysqldump -u root -p'*my password*' --all-databases > "a:\mysql\all_databases.sql"
Which appears to execute, but the resultant file is only 1kB in size. Whereas the first command generates a file that is 2661kB.
Can anyone help me?
Try the following command, replace "your_password" with the root password:
mysqldump --user=root --password=your_password --all-databases >"a:\mysql\all_databases.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