I am using mysqldump to take backup of my database, but the command is not working..
the command i am using is mysqldump -u root dbname> 'c:\backupdatafolder\backup.sql'
i am running this command in MySQL cli but not running,..is there any thing wrong in the command?
If mysqldump is not identified by the cmd prompt that means it cannot recognize where the mysqldump.exe is located. You need to add path of the directory where the exe is located in the PATH variable under environment variables. After doing that your command will start working in the cmd prompt.
To dump/export a MySQL database, execute the following command in the Windows command prompt: mysqldump -u username -p dbname > filename. sql . After entering that command you will be prompted for your password.
You are supposed to run that on the command line of your operating system not on the MySQL CLI.
cd
to the bin folder of MySQL first, something like C:\mysql\bin
or wherever your MySQL is installed on
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