I have a lot of excel/ CSV files that I need to load into my db in MySQL Workbench (I'm on Mac OS X). I've searched around for a good walk-through or tutorial, but I haven't seen anything that clearly explains how to load CSVs into MySQL Workbench....can anyone help?
are you trying to load csv files into a MySQL table? You can do that easily with the LOAD DATA LOCAL INFILE
command.
Example:
LOAD DATA LOCAL INFILE '/data.csv' INTO TABLE my_table FIELDS TERMINATED BY ','
You should be able to enter that command from any interface to MySQL. I'm assuming workbench has a way for you to execute sql queries.
Does it have to be Workbench?
Can you use other MySQL bins?
Here's an example: Create database
Create table
load data local infile '/path/whatever.csv' into table dbName.tableName fields terminated by ',' enclosed by '"' lines terminated by '\n';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With