How to import a CSV file to a SQL database on Mac?
With TablePlus, you can easily import a CSV file to any SQL databases within a couple of clicks.
New to TablePlus? It’s a modern, native client with intuitive GUI tools to create, access, query & edit multiple relational databases: MySQL, PostgreSQL, SQLite, Microsoft SQL Server, Amazon Redshift, MariaDB, CockroachDB, Vertica, Cassandra, Snowflake, Oracle, and Redis.
You can download TablePlus for macOS directly here: Download TablePlus for Mac.
This post shows you how to use TablePlus GUI to import data from a CSV file to a MySQL database.
1. Get connected to the MySQL database.
2. Navigate to menu File > Import > From CSV…
If you want to import data from CSV file to an existing table, right-click on the table and choose Import > From CSV…
3. Select the CSV file stored on your Mac.
4. Data mapping
If you import data to an existing table, select the table from the dropdown list. If the table doesn’t exist, tick on Create new table.
TablePlus will automatically detect and map the columns with the corresponding data type, alter the data mapping as you need. Then hit Import.
5. And done!
You can wait a little bit while TablePlus is importing. It will pop out a notification when the import is done. After that, you need to refresh the current workspace to see the import results.
Not on Mac? Download TablePlus for Windows.
On Linux? Download TablePlus for Linux
Need a quick edit on the go? Download TablePlus for iOS