title: How to import huge CSV file with 200,00 rows to MySQL (asynchronous and fast)?
body: <p>I have to write a PHP script that will import data from a given CSV file into MySQL database. The given CSV file can contain up to 200,000 rows.
  I tried the following but problems arise : </p>
  
  <ol>
  <li>LOAD DATA LOCAL INFILE : I cannot use LOAD DATA LOCAL INFILE statement because I wanted to do some validations first BEFORE uploading the rows, also, our DB admin doesn't want me to use that statement and I don't know why.</li>
  <li>FOR LOOP : Inserting line by line inside FOR loop will take too much time resulting to Connection Timeout.</li>
  </ol>
  
  <p>Now, I am thinking of a solution by splitting the CSV file into smaller chunks, then inserting them asynchronously. I am already done with the splitting of CSV, but I currently have no idea how to asynchronously insert into my database for quick and safe way. But I heard that I will be using Ajax here.</p>
  
  <p>Any solution you can recommend? Thanks a lot in advance!</p>