Using a mysqldump export to create data with a different database name I am using the following to import database using a mysqldump export:

mysql -u root -p example_db &lt; path/to/export.sql


I would like to import the database to a database with a different name to the one referenced in export.sql. Is there a way to do this other than manually editing the export.sql file?
Use the option --no-create-db when you execute your mysqldump, this option avoid inserting CREATE DATABASE IF NOT EXISTS db_name; in dump file.

Max.