mysqldump is the export tool with which you would create the file to import, e.g.
mysqldump -u root -p db > db-export.sql
The resulting file will consist largely of SQL CREATE statements, followed by INSERT statements.
mysql is the interactive MySQL client, which will also happily take a file full of SQL on stdin and carry out those queries -- in this case, importing the exported dump.
mysqldump
is the export tool with which you would create the file to import, e.g.The resulting file will consist largely of SQL
CREATE
statements, followed byINSERT
statements.mysql
is the interactive MySQL client, which will also happily take a file full of SQL onstdin
and carry out those queries -- in this case, importing the exported dump.mysqldump is for export/backup databases: