The client sent a .sql backup and Excel won’t open it. That’s because it’s a script that rebuilds a database. Run it into a scratch database in Navicat, export the tables to CSV, and you’re back on familiar ground.
On this page
- The problem
- 1 · Scratch connection
- 2 · Run the .sql file
- 3 · Export to CSV
- Tips and fixes
- Gotchas and FAQ
A .sql file isn’t data. It’s instructions.
You can’t open a SQL backup in Excel, because it’s a script that rebuilds a database. Run it into a scratch database, then export the tables you need as CSV.
Clients leaving an old system often hand over a .sql backup. Inside are CREATE TABLE and INSERT statements: everything needed to rebuild the database, nothing you can map yet. A database tool runs those statements for you. Navicat Premium is the friendly one if SQL isn’t your day job (DBeaver works too).


Prefer to read? Everything in the video is written out below.
Create a scratch connection.
A local MySQL connection to hold the rebuilt database.
Get Navicat Premium from navicat.com if you don’t have it. You need a MySQL server running on your machine for it to connect to.
- On the Navicat home screen open Connections and choose MySQL.
- Name it anything, e.g.
scratch. Hostlocalhost, port3306, your MySQL user and password. - Click OK.


Run the .sql file.
Execute the backup into a new, empty database.
- Expand the
scratchconnection. Right-click it, choose New Database and call it something likeclient_extract. - Right-click the new database and choose Execute SQL File…
- Pick the backup file and click Start. Navicat runs every statement and logs progress.
- When it finishes, read the log for errors or warnings before you close it.
Use a new database, not the built-in mysql one. The mysql schema holds the server’s own settings and users. Loading a client’s tables into it mixes the two and makes cleanup messy.
Export the tables you need to CSV.
Export Wizard, CSV, pick the tables, keep column titles on.
- Expand the database and open Tables. Click one to preview it.
- Right-click → Export Wizard → CSV file (*.csv) → Next.
- Tick every table you want (several at once is fine) and choose an export folder.
- Keep Include column titles on, pick the date order your project uses (e.g. MDY), leave delimiters and text qualifier at their defaults.
- Click Start.
Now you have a folder of CSVs. If it’s hundreds of them, the source analysis Claude skill maps out what’s in them before you start mapping.
Tips, mistakes and fixes.
| Problem | Fix |
|---|---|
| Opened the .sql in a text editor and saw code | That’s normal. It’s a script. Run it in Navicat |
| Can’t connect | Check host, port, user and password, and that MySQL is actually running |
| Execute SQL File fails | Read the message log. Usually a syntax error or a dump from a different database engine |
| Dates come out wrong in Salesforce | Match the export date order to what you’ll load, and check for time zones. The date formatting post has the formulas |
| Exported every table | Only export what you’ll migrate. Less to map, less to go wrong |
When the CSVs reach Data Loader, map to API names. For cleanup formulas, see Data Migration Excel Formulas.
The questions people ask.
Can I import a .sql file straight into Salesforce?
I don’t have Navicat
The backup is huge
What usually goes wrong in the CSVs?
Extraction is only step one.
The Masterclass walks through the whole migration after this: analysing the extract, mapping it, and loading it in the right order.
Know someone staring at a .sql file they can’t open?
Share on LinkedInOne CSV is a tutorial. Forty objects, 15 years of history and a go-live date is a project. That’s the part I do for a living.
See how I run migrations →