How to backup more than 1 database in once in MYSQL using command line on ubuntu server 10.10?

StackOverflow https://stackoverflow.com/questions/18249331

문제

I am backupping some databases, but NOT ALL from my old Computer using ubuntu 10.10 and MySQL installed ofc. so i go for

sudo mysqldump "DBNAME" -u root -p > DBBACKUPNAME.SQL

after entering the password, the backup is successfully stored in the dir I am currently in. Fine.

But now i want to backup more than one DB. I tried

sudo mysqldump "DBNAME1,DBNAME2" -u root -p > DBBACKUPNAME.SQL

But that's not working. So How to do that?

도움이 되었습니까?

해결책

Solved it, using :

sudo mysqldump --databases DBNAME1 DBNAME2 -u SQLUSERNAME -p > SQLBACKUP.sql
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top