mysql dump mysql db cli
snippet in sql

mysql dump mysql db cli

user461

#note by specifying -p flag without a password it'll prompt you for pass

DUMP:
mysqldump -u username -p dbname --lock-tables=false > filename.sql

Import:
mysql -u username -p dbname < filename.sql

Import external:
mysql -h host -u username -p dbname < filename.sql 

database dump mysql command

user8266

mysqldump -u username -p dbname > filename.sql

database dump mysql command

user1440

mysql -u username -p dbname < filename.sql