what could be the problem?
That, actually, You didn't take a dump.
This must be done by the program mysqldump
, not mysql:
mysqldump -uuser -p dbname > dump.sql
And start mysql with -u and the name of the base does not upload data. The utility returns You to interactive mode for further manual operations with the selected base.
That You didn't take a dump, specifies and immediate return console after pouring.