Change Is Inevitable
  • Home
  • MySQL
    • MySQL-Articles
    • AWS RDS
    • Percona Xtradb Cluster
    • MariaDB
    • Galera Cluster
    • ProxySQL
    • MySQL-Scripts
    • MySQL tools
    • MySQL Resources
  • Tools
    • MySQL Advisor
    • MySQL Random Data Generator
    • Postgresql Random Data Generator
    • Clean Prompt
  • General
    • binary-to-decimal
    • Fermat’s Theorem
    • Review
    • Just for fun
    • Personal
  • Contact Me
    • Copyright
    • MySQL Podcast (Youtube)
    • MySQL Podcast (Spotify)
Recent Posts
  • MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • How to setup and use Percona Binlog Server (PBS)
  • MySQL Major Version Upgrade Checklist – how to
  • InnoDB Flushing is simple – explained
  • MySQL Tools for Performance Tuning and Test Data Generation
Recent Comments
  • Kedar on MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • Jean-François Gagné on MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • Reggie on A Unique Foreign Key issue in MySQL 8.4
  • Kedar on How to fix write latency in MySQL 8.4 Upgrade
  • Kedar on How to fix write latency in MySQL 8.4 Upgrade
Home » load data to mysql
Change Is Inevitable

Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects

  • Home
  • MySQL
    • MySQL-Articles
    • AWS RDS
    • Percona Xtradb Cluster
    • MariaDB
    • Galera Cluster
    • ProxySQL
    • MySQL-Scripts
    • MySQL tools
    • MySQL Resources
  • Tools
    • MySQL Advisor
    • MySQL Random Data Generator
    • Postgresql Random Data Generator
    • Clean Prompt
  • General
    • binary-to-decimal
    • Fermat’s Theorem
    • Review
    • Just for fun
    • Personal
  • Contact Me
    • Copyright
    • MySQL Podcast (Youtube)
    • MySQL Podcast (Spotify)

Browsing Tag

load data to mysql

1 post
load-data-to-mysql
  • MariaDB
  • MySQL
  • MySQL-Articles
  • 97 comments

How to Load Delimited Data CSV Excel to MySQL

  • Kedar
  • January 11, 2010
Loading CSV to MySQL or any delimited data files to MySQL database is a very common task frequently questioned about and almost every-time LOAD DATA INFILE come into rescue. I’ll…
View Post
MySQL Podcast (Youtube)
RSS feed: MySQL Podcast (Spotify) MySQL Podcast (Spotify)
  • MySQL Major Version Upgrade Checklist (Zero Downtime Strategy)
    Upgrading MySQL major versions in production is never just a version bump - it’s a carefully planned process involving compatibility checks, replication strategy, testing, and controlled cut-over.In this episode, we walk through a practical MySQL Major Version Upgrade Checklist based on real-world DBA workflows. We are covering MySQL replication as base setup for upgrade. It […]
Search:
... ...
  • MySQL INSTANT DDL breaks EXCHANGE PARTITION
  • How to setup and use Percona Binlog Server (PBS)
  • MySQL Major Version Upgrade Checklist – how to
  • InnoDB Flushing is simple – explained
  • MySQL Tools for Performance Tuning and Test Data Generation

97 responses to “How to Load Delimited Data CSV Excel to MySQL”

  1. mysql - How to import data from excel/csv to database using php - Code Utility - Code Utility
    March 2, 2022

    […] http://kedar.nitty-witty.com/load-delimited-data-csv-excel-into-mysql-server […]

    Reply
  2. ALEENA BABY Avatar
    ALEENA BABY
    January 9, 2019

    Hello,
    If in my csv in one column there is one comma, then what should I do for read that completely. Now its going to the next column ?

    Reply
    1. Priyank Mehta Avatar
      Priyank Mehta
      February 12, 2021

      Use

      FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘\”‘
      LINES TERMINATED BY ‘\\r\\n’

      Reply
  3. arie Avatar
    arie
    June 7, 2018

    csv file
    215,1,1,800 m WANITA – AKHIR,,,,,,,”19:54,47.8164″
    1,049,6,,HIZILLAWANTY JAMAIN,KENINGAU,”2,32.70″
    2,158,3,,CHELESTIE ANN JALISA,KOTA MARUDU,”2,33.65″
    3,012,4,,NORFAZILAH NORDIN,BEAUFORT,”2,33.68″
    —————————————————
    mytable
    eventNo, round, event name,pos,idNo,lane,name,team,time
    ——————————————————-
    can anyone help me how to import that data to my table..please help me

    Reply
  4. Kshitij Satpute Avatar
    Kshitij Satpute
    December 15, 2017

    Take a look at this:

    https://github.com/KRSatpute/mysql_csv_parser

    Reply
  5. Gaurav Pardeshi Avatar
    Gaurav Pardeshi
    May 15, 2017

    Where to write the load data line?

    Reply
  6. Manjeet Lama Avatar
    Manjeet Lama
    October 26, 2016

    Hi kedar ,

    Below is my data of one csv cell. it has comma in it and i am not able to store this into database using LOAD FILE command. It iterpret the comma as cell seperator.

    any solution for this.
    “=HYPERLINK(“”ScreenShotPath/16.23.53.882.png””,””Screen-shot””)”

    thanks and regards ,
    Manjeet

    Reply
  7. Mandar Avatar
    Mandar
    October 21, 2016

    Every time I try to load data from .txt or .csv it does not load all the records in MySQL. Also end up with warnings.

    Reply
    1. Kedar Avatar
      Kedar
      October 21, 2016

      Would you like to provide sample file, table definition, command you use and error you get?

      Reply
  8. Amit Avatar
    Amit
    July 26, 2016

    I have an csv file having 3 col. and want to import only first and third col. into mysql database using load data infile…Mysql database having only two required col.

    Reply
  9. Ady Avatar
    Ady
    May 22, 2016

    I have a lot of data in txt file. I want to delete that data from mysql table.
    can u suggest me how can i delete data with the help of txt file from one table?

    Reply
Change Is Inevitable
Designed & Developed by Code Supply Co.