Wednesday, March 9, 2016

Import CSV File Into MySQL Table in Ubuntu server

These are the steps that i followed to import a CSV data file to MySQL database

  • Create a table in MySQL database. CSV file name should be equivalent to the table name that you are going to import.  
EX: Table name is : PS_EMPLIDS
  • Execute following command  

Command to import csv file to MySQL :
mysqlimport --user=mysqlUsername --password=mysqlPassword --ignore-lines=1 databaseName ~/PS_EMPLIDS.csv


No comments: