Knowledge Base
Importing a database
Load an SQL file into your database.
- Back up the destination first.
- Connect with a client, see Connecting to your database.
- Import the
.sqlfile. In HeidiSQL use File › Run SQL file. In DBeaver use Tools › Execute script. Or from the command line:
mysql -h HOST -P PORT -u USER -p DBNAME < backup.sql
Tips
- Large imports can time out in a web tool. Use a desktop client or the command line.
- Create the database first. The import fills it.
- Match the character set of the original.