How to import medium sized data into MySQL using LOAD DATA LOCAL INFILE (Toy Example) | Lecture

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ม.ค. 2025

ความคิดเห็น •

  • @dmax9324
    @dmax9324 2 หลายเดือนก่อน

    THIS IS THE ONLY RESOURCE THAT SHOWED WHAT I NEEDED AFTER AN ENTIRE DAY OF TRYING. THANKS!!!!!!!!

  • @ZayingIt
    @ZayingIt 10 หลายเดือนก่อน +1

    Such a life saver man! After 2 dreadful hours - you helped me out. God bless you!

  • @Xplanator
    @Xplanator ปีที่แล้ว +2

    You are a life saver!
    Struggled so much with the table import wizard, but this was so helpful!
    Thank You!

  • @iloveeeroro
    @iloveeeroro ปีที่แล้ว

    Thank you! Ive been trying fix this problem all night and you fixed it in a few minutes!

  • @matthancock9883
    @matthancock9883 ปีที่แล้ว +1

    So thankful I came across your excellent video after one day of endless dead ends. Thank you. Thank you. Thank you!!

  • @JeyadarshiniRaja2020
    @JeyadarshiniRaja2020 ปีที่แล้ว +3

    Thank you so much for this amazing video. It was on point and resolved my headache finally!

  • @mahreenathar6928
    @mahreenathar6928 3 ปีที่แล้ว +2

    Great video! I was having so much trouble with Load command and your video really cleared up the confusion!

  • @anmjubaer
    @anmjubaer 2 ปีที่แล้ว +1

    A big shoutout for you man. You saved a lot of my time. I mean a lot. Thanks.

  • @outofahat9363
    @outofahat9363 ปีที่แล้ว

    9:20 for anyone using mysql cli instead of mysql workbench add the parameter --local-infile=1 instead. Also if you are on windows every \ in the path must be escaped (put double backslash \\)

  • @yashchavhan8001
    @yashchavhan8001 ปีที่แล้ว

    Thank you very ... I am really very grateful...
    I got both errors...I did this...
    1.Refresh my sql
    2. Replace '\' with '\\'
    The comment section helped a lot...thank you so much guys !!!

  • @TheJbb119
    @TheJbb119 3 ปีที่แล้ว +1

    Great video Michael. This was exactly what i needed!

  • @浩然李-c3y
    @浩然李-c3y ปีที่แล้ว

    thanks you just save my life

  • @TheGIT_Show
    @TheGIT_Show ปีที่แล้ว +1

    Oh my god. I cant tell you how badly i wanted this.

  • @nehaburug645
    @nehaburug645 ปีที่แล้ว

    Thank you soo much.
    I was about to cry now.

  • @simpleton7758
    @simpleton7758 3 ปีที่แล้ว +1

    really helpful! I could load csv from my desktop FINALLY.

  • @fehmidatahir2509
    @fehmidatahir2509 2 ปีที่แล้ว +3

    Hi Michael! Thank you SO much for this detailed step-by-step video. I have a file that has around 30 columns, is there any other way to make columns in scehma table, apart from the method that you have showed in this video?

    • @michaelkaufmann1978
      @michaelkaufmann1978  2 ปีที่แล้ว

      You can use the table import wizard which automatically creates a table for the file. It's slow though. But for creating the table it's usable.

    • @jaideepnalluri
      @jaideepnalluri ปีที่แล้ว

      After starting the import,you can cancel the import but the column names and table will remain and then we can use infile load

  • @sriramj2800
    @sriramj2800 ปีที่แล้ว

    Thanks a lot. It saved a lot many hours indeed!

  • @ambersahu8881
    @ambersahu8881 2 ปีที่แล้ว +1

    Amazing video bro. It just solved my headache

  • @Vlad.1O
    @Vlad.1O ปีที่แล้ว

    ME SALVASTE. NO SÉ INGLÉS PERO LO EPXLICASTE TAN FÁCIL QUE PUDE ENTENDERLO. SALUDOS DESDE PERÚ. LO MÁXIMO

  • @therealnucleus274
    @therealnucleus274 2 ปีที่แล้ว

    thank you Michael, hugely helpful!!

  • @avanimittal8330
    @avanimittal8330 ปีที่แล้ว

    Hi! while importing the file, in 1st step itself I'm getting an error: "list index out of range". Please help.

  • @nishant2399
    @nishant2399 11 หลายเดือนก่อน

    hey there! I have followed the exact same steps as you have told but I it is still throwing error 2068: restrictions

  • @Arun1147
    @Arun1147 2 ปีที่แล้ว +1

    Thanks you so much!

  • @mohdatif8976
    @mohdatif8976 2 ปีที่แล้ว

    when I do this, I get OS errno 2 - which says that MySQL cannot find such file or directory. How can i fix that?

  • @reezalzainudin8097
    @reezalzainudin8097 2 ปีที่แล้ว +1

    Thank you Michael. I got 170654 rows returned in 5 seconds. However, I need to type path as \\ instead of \ for this to work.

  • @ahmedfarazdev
    @ahmedfarazdev 2 ปีที่แล้ว

    Great Video Thanks Gentleman

  • @mrandmrscardona7724
    @mrandmrscardona7724 3 ปีที่แล้ว +1

    I will try this..hope this works

  • @shreyjain6447
    @shreyjain6447 2 ปีที่แล้ว +1

    I have a csv with 400k rows and with this method it returns only 1 row. Any idea why?

    • @michaelkaufmann1978
      @michaelkaufmann1978  2 ปีที่แล้ว

      It imports only the rows that generate no error. Perhaps you have duplicates, perhaps some data type issues.

  • @eramshahzadi4757
    @eramshahzadi4757 2 ปีที่แล้ว

    Hello, I wanted to ask that is it mandatory to create a table before running teh load data infile command? becuase, I have like many mnay columns in a file and cant create a table manually. plz help

  • @mayankporwal4858
    @mayankporwal4858 2 ปีที่แล้ว

    what to do if we have date or string datatype in a column of table to be imported?

  • @jorditejadacarreras8944
    @jorditejadacarreras8944 2 ปีที่แล้ว

    IN MY CASE IT GIVES ME AN ERROR 2068 load data local infile file request rejected due on access, some tip?

    • @michaelkaufmann1978
      @michaelkaufmann1978  2 ปีที่แล้ว

      Close the connection, and choose "Edit Connection" in the context-menu of the connection. Then, in the "Advanced" tab, put the parameter OPT_LOCAL_INFILE=1 in the "Others" input field. Then reconnect and try again. That should do the trick.

    • @therealnucleus274
      @therealnucleus274 2 ปีที่แล้ว

      make sure there are no spaces in the entire string "OPT_LOCAL_INFILE=1". Had the same error message and it drove me almost crazy until i figured out that I had spaces between the equal sign and the 1

  • @Monika-vu3zs
    @Monika-vu3zs 2 ปีที่แล้ว

    When i run load data local infile....it shows an error: file not found.... can somebody tell me what is wrong

    • @michaelkaufmann1978
      @michaelkaufmann1978  2 ปีที่แล้ว

      You need to specify the correct pathname.

    • @michaelkaufmann1978
      @michaelkaufmann1978  2 ปีที่แล้ว +2

      Also, in Windows, use \\ instead of \

    • @olaoluwaomoyebi6772
      @olaoluwaomoyebi6772 ปีที่แล้ว

      You're a life saver!!.. I've been on this for the past 20 minutes and all i had to do was use \\ instead of \..Thank you!
      @@michaelkaufmann1978

  • @AnkurSharma123
    @AnkurSharma123 2 ปีที่แล้ว +1

    Hi Michael. I'm getting this error -
    Error Code 2068 : Request rejected due to restrictions on access. Please help how to sort it out.
    Thank you.

    • @xuancarlos8684
      @xuancarlos8684 2 ปีที่แล้ว +2

      if you have added the OPT_local_infinite = 1, try to restart your SQL. i met the same error and after restart it works.

    • @AnkurSharma123
      @AnkurSharma123 2 ปีที่แล้ว +1

      @@xuancarlos8684 Thank you. It is working now. Thanks a lot :)

  • @OurSinisterHorizons
    @OurSinisterHorizons 10 หลายเดือนก่อน

    Saved me and I am greatful. Thank you. Could you make a video on Error Code: 2013. Lost connection to MySQL server during query? If so, that would be awesome ! ! ! \^o^/