2 Methods to Import data from MS-Excel or CSV files into MySql database
There are several methods to import ms-excel/csv into mysql database. For example, using
LOAD DATA INFILE statement in mysql, by using various different mysql clients like, HeidiSql or Nevicat etc. But here I will show you 2 other ways to import excel or csv data into mysql via MS-Access:
First Step: Firstly import your excel/csv file into Ms-Access table:
Open Ms-Access -> Under External Data Tab -> Excel (Text File for csv file).
Once you have data in your Access table then you can export table in two ways:
1. Dowload MySql ODBC driver
2. Create ODBC connection from Start -> All Programs -> Administrative Tools -> data Sources (ODBC) -> System DSN -> Add
Create a connection by following the instructions.
Once your connection is created then go to msaccess again where you just imported the database.
Right click on table you just imported. On context menu click Export -> ODBC database
select the connection you just created and then Ok , thats it. Your data is imported to mysql database.
1. Download BullZip Access to Mysql
2. Install Bullzip Access to Mysql , open it , browse for the MS-Access file in which you imported the excel data.
3. Select table and Export it to .sql file
4. now you can import this sql in your Mysql database.