mysqldump -u root -p DBNAME > BKPNAME.sql
mysql -u root -p DBNAME < BKPNAME.sql
You pay leave out the “-p” and it won’t ask you for the root password –
Password to use when connecting to server. If password is
not given it’s asked from the tty.