简体   繁体   中英

I can not make DB dump using mysqldump

I am trying to make DB dump using mysqldump like below,

# mysql -u root -p 
after i login, i did command like below,
#mysql>  mysqldump -u root -p --no-data Dbname > /var/lib/myfolder/MyDB.sql

if i enter then it gives like below,

mysql> mysqldump -u root -p --no-data Dbname > /var/lib/myfolder/MyDB.sql
    ->
    ->
    ->
    ->
    ->

I can not do anything than CTR+C. where am i doing silly mistakes?

Issue the command at shell level, not from within mysql, ie instead of

# mysql -u root...

type

# mysqldump -u root -p --no-data Dbname > /var/lib/myfolder/MyDB.sql

You are missing the ; at the end of the command. Try it like so:

mysql> mysqldump -u root -p --no-data Dbname > /var/lib/myfolder/MyDB.sql;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM