Vote Up 0 Vote Down

create mysql database backup

How we can backup a mysql database. I know we can do it in phpmyadmin. But I need to do that in terminal.
But I got the following error:

bash: ./mysqldump : No such file or directory

What is the mistake ?


Vote Up 0 Vote Down
Your path for mysql may be different or you may not installed mysql or xampp.

Follow these steps to backup your database using mysqldump.

Step 1:

Go to the directory where you installed mysql in the case if xampp installed go to xampp directory using terminal.

If you are using linux:

cd /opt/lampp 

If you are using windows:

cd c:\xampp

Step 2:
Type as following

bin/mysqldump -u root -p mydatabase > mydatabase.sql;

It will create a sql backup file in xampp/bin directory.
flag | link |

Your Answer

Login before answering

Login with facebook