how to create mysql databse backup if using in command line

37 views Asked by At

I am using MySQL in command line . I need to create backup of my database as I am afraid that if any virus attacks my laptop then I need to format it and my database will be lost . Please tell me how to create backup of my database . .

1

There are 1 answers

0
Rahul On

I think you meant to use mysqldump utility from command line like

mysqldump -u test -ptest <DB_NAME> > Backfile.mysql