16 May 2018

Import csv file to MySQL, the fastest way is to use a direct import with query. You have to have the columns created the way you need.

Source code viewer
  1. /* Csv file to import. */
  2. LOAD DATA INFILE '/var/www/my_file.csv'
  3. /* Your table, where to import. */
  4. INTO TABLE my_table
  5. /* Csv file format. */
Programming Language: MySQL