this is the way you can export/backup and import/restore a single/all databases:

backup and restore a single database (one by one):

mysqldump -u root --password=123uio1u database_name > dumpfilename.sql

restore:

mysql -u root --password=123uio1u database_name < dumpfilename.sql

Dump only certain tables

mysqldump -u root --password=123uio1u database_name table1 table2 table3 > mydb_tables.sql

 

backup and restore all databases:

if you want to backup ALL databases BE AWARE THAT EXTACTING A SINGLE DATABASE OUT OF THE DUMP-OF-ALL IS TRICKY!

(basically you need a Test-Machine with phpmyadmin, import the DUMP-OF-ALL and EXPORT only the database that you need/want to transfer to remote host)

#backup all databases in one file (eventually add the option --add-locks):
mysqldump -u username -p --all-databases > file.sql

#backup all databases in one gzipped file:
mysqldump -u username -p --all-databases | gzip > file.sql.gz

#restore all databases:
mysql -u username -p < file.sql
admin