Convert CSV file To Mysql (.sql) database file?

mysql, phpmyadmin, sql

Solution

Why dont you try to import file using MySQL Console? I think, you will not face any problem this way. You will not need to split the file into chunks. Just take care of syntax.

load data infile 'c:/filename.csv' into table tablename fields terminated by ',';

For details about syntax, refer Load Data Infile on official documentation. For example, refer this and this.

Hope it helps!!!

Problem

I am using : WampServer 2.2, Apache Version :2.2.21, PHP Version : 5.3.8, MySQL Version :5.5.16, PhpMyadmin Version: 3.4.5... I have face Problem Of Importing CSV file-(size 13MB*), Error File is Too large... phpMyadmin allow only 2MB file size ... So Separate files with 1.83MB file size...then also it does not work ??? And also tell me , How to automatic create table through CSV file ...?

Original source