MYSQL Tutorial: Efficiently Importing Large CSV Files into MySQL Database with LOAD DATA INFILE

  Рет қаралды 75,712

Data Analytics

Data Analytics

Күн бұрын

Пікірлер: 203
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Explore more on MYSQL CSV import: 1) using python and pandas (kzbin.info/www/bejne/a3q4aIOQj5V_g5osi=ayhprBcnipS8-RJM) 2) using table data import wizard (kzbin.info/www/bejne/pp6vo52qo7p4eMUsi=a4C2Mxb0UaAEajBk) Find Error 1290 "secure-file-priv error" solution here (kzbin.infon4xjOUnfOMY?si=2ACk_9oOw0WfStyr)
@ErinMcDonald-n8d
@ErinMcDonald-n8d Жыл бұрын
I was having a hard time finding the Program Data folder on my local disk, so for others who might be having the same issue here's a solution on Windows that worked for me: Click your disk, click the 3 dots next to view, click options, click view, and then click Show hidden files, folders, and drives. After I did that, the Program Data folder showed up!
@kimjongun7574
@kimjongun7574 Жыл бұрын
Thank you you saved me
@Collinstobenna
@Collinstobenna Жыл бұрын
You have no idea how much this has helped me. I've been stranded on this for a long while. Lol.
@akshaygaikwad2899
@akshaygaikwad2899 Жыл бұрын
Thanks a ton man
@davidobaita5169
@davidobaita5169 Жыл бұрын
Thank you so much for this insight. You're amazing.
@pushpakambrati5335
@pushpakambrati5335 9 ай бұрын
Thank you so much brother... This was so helpful...wasted hours trying to do this
@samratkundu2799
@samratkundu2799 Жыл бұрын
Finally! A detailed video for this process. Thank you so much 🙏
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Glad it was helpful!
@buddikathilakarathna1446
@buddikathilakarathna1446 3 ай бұрын
Finally! A detailed video for this process. Thank you so much 🙏
@omkarpol4205
@omkarpol4205 8 күн бұрын
Thanx to DataAnalytics channel, it does help me in importing large dataset within few seconds :)
@sergiotorres513
@sergiotorres513 10 ай бұрын
Buddy, thank u so much for this video. I got a problem trying to resolve the secure-fiele-priv issue, but I read your comments and I could resolve it. THANKS A LOT.
@AnalyticsExplorers
@AnalyticsExplorers 10 ай бұрын
Grateful that my video helped you!🙏
@opeyemi5294
@opeyemi5294 Жыл бұрын
Thank you for the video. But, I couldn't find "DATA" inside the mysql server. All I have are bin, docs, etc, include, lib, share … please how can I fix this?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
It seems that you go to wrong directory. You must go to local disk C - ProgramData - MYSQL - MYSQL server and there you will find your folder.
@yogeshbala9767
@yogeshbala9767 3 ай бұрын
​@@AnalyticsExplorersI'm also facing same issues
@maryadebimpe9424
@maryadebimpe9424 Жыл бұрын
Thank you so much. I have watched a lot of videos, but after watching this video, I finally got it 😊. A new subscriber 🥳🥳
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Really thankful for your feedback and motivation! Hope you enjoy the upcoming content. If you have any suggested topics to discuss, please feel free to suggest it.
@indianfacts1936
@indianfacts1936 3 ай бұрын
thanks of lot ...i have no words for you but such as you are a great man...this error have taken my a lot of time but after seen your video my all problem was solved as clear cut to cut ...once again thanks of lot...🙌🙌❤❤
@zainabjubril3244
@zainabjubril3244 Жыл бұрын
You lost me at the part where you 'pasted' on the file path. What did you paste because I didn't see you copy anything prior to that?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
I Just pasted the file path to be imported in my database. To do this go to the folder where your file is located and from the upper bar in your computer click on the folder name and copy it
@mayadisilalahixipmia-1657
@mayadisilalahixipmia-1657 4 ай бұрын
but how to limit the number of rows i'm want to import? (in this case, i jusr want to import the first 1000 lines)
@sarahqmangrum
@sarahqmangrum Жыл бұрын
Steps on importing the .csv file from a Mac. I am having trouble locating the same pathways on my Mac. I understand that Macintosh HD is equivalent to C Drive on Windows PC but unable to locate next steps. This has been a great video up to this point as I was struggling to import a very large Excel file.
@JuanBasso17
@JuanBasso17 Жыл бұрын
Hi Sarah! I've been looking for someone that had the same problem as me! Would you mind explaining how you fixed it?
@snehashekar1839
@snehashekar1839 11 ай бұрын
Hey I do also have same problem uploading my data on mac
@daneeplays5275
@daneeplays5275 7 күн бұрын
This just helped me save tons of time. Thank you so much!!
@kunalbolar2488
@kunalbolar2488 8 күн бұрын
how to solve this error Error Code: 1265. Data truncated for column 'stringency_index' at row 430
@louisocarroll
@louisocarroll Жыл бұрын
What if mysql server is not on local computer? I keep getting the error: "Access denied for user..."
@ramyarathimaheshwari9149
@ramyarathimaheshwari9149 Ай бұрын
Hey u got solution for same
@louisocarroll
@louisocarroll Ай бұрын
@@ramyarathimaheshwari9149 the problem is free hosting services wont grant you necessary permissions..
@Apst_Heinze
@Apst_Heinze Жыл бұрын
Must I clean my data in excel before importing to MySQL
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Yes of course, cleaning your data is very important to efficient importing to MYSQL. if your create a table with a column that contains dates, and there are some cells that have incorrect date formats. This will raise an error while importing and more errors can happen for different situations. So clean your data as much as you can.
@jongdave2691
@jongdave2691 Жыл бұрын
Hello, once "secure-file-priv" delete the path written and leave it with empty string, I can't get connection to the server. MySQL81 is down. what should I do? Please help. Thank you.
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
What exactly you get or what happened in detail?
@jongdave2691
@jongdave2691 Жыл бұрын
"Could not connect, server may not be running, Unable to connect to localhost." Only thing I did is empty string for "secure-file-priv". @@AnalyticsExplorers
@pheter1000
@pheter1000 11 ай бұрын
Hello i've same problem, can you solved it ?
@ibrahimalisayedahmed4101
@ibrahimalisayedahmed4101 Жыл бұрын
I don't have the folder named 'Program Data' in the local disk C, how can I find it ?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
The file may be hidden. Make sure to show all files.
@dezinhtang
@dezinhtang 11 ай бұрын
as a data analyst,it’s possible that just import all excel data to mysql and query data as we need without learning excel ?
@sunidhibhat1342
@sunidhibhat1342 10 ай бұрын
But it is showing error saying server is running with secure server file priv option. What shld i do
@AnalyticsExplorers
@AnalyticsExplorers 10 ай бұрын
Hi there, Go watch this short video and I hope it will help kzbin.infon4xjOUnfOMY?si=qr6LFLij2jNRsBh2 Good luck!
@MuhamadFajarSeptian
@MuhamadFajarSeptian Ай бұрын
thats really works. but i haven't get data for some column. the result is blank. can you help me?
@asuquobassey1202
@asuquobassey1202 10 ай бұрын
Still having issues. My dataset does has lot of null values and its not a calculated field you can easily apply formula. How do I import this file with the nulls
@muhanadmawasalkazmeh137
@muhanadmawasalkazmeh137 Жыл бұрын
I have a table with 34 columns and 600000 rows. Can I import this data into mysql?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
You can do something good. you can divide your table into 2 parts, one part contains the columns' titles and few rows and the other part contains the remaining rows. You can use the Table Data import wizard method to quickly import the first small part where MYSQL will define all columns data types by itself "You can watch this method's steps on my Channel by the way". Now you have the table created and its columns are well defined. You can use this video method (LOAD DATA INFILE STATEMENT) to import the second remaining part. Good Luck!
@Learn_lane
@Learn_lane Жыл бұрын
Thank you for this video but I am getting this error when I am saving that file in mysql data folder " you don't have permission to save in this location contact the administrator to obtain permission" How to resolve this issue
@ramyarathimaheshwari9149
@ramyarathimaheshwari9149 Ай бұрын
Did u find solution?
@Emotion-od8ob
@Emotion-od8ob 5 ай бұрын
Omg thank you so much have seen many vedios but nothing workes. U just saved me thank you thank
@benis4913
@benis4913 Жыл бұрын
Hi sir, Issue is if iam importing 1009 rows data it's taking 196 records , why it's coming like that how can I rectify this
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Tell me what you exactly get from the error?
@benis4913
@benis4913 Жыл бұрын
@@AnalyticsExplorers My data contains 10,000 Rows If iam imported The data it's taking only 196 Rows I don't why even I have changed 50000 limit rows .
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
@@benis4913 do you receive any error? Does the query end with a warning message or any type of errors? Or the query doesn't return any messages?
@benis4913
@benis4913 Жыл бұрын
@@AnalyticsExplorers Hi What iam telling I can able to import the exact file It's perfectly imported the data the thing is It's not Taking fulll data to import
@MichaelAgyebeng-y2h
@MichaelAgyebeng-y2h Жыл бұрын
@@benis4913 Hi, Have you found a solution. I am facing the same kind of situation right now
@alanhernandez7201
@alanhernandez7201 Жыл бұрын
Hi! what happens if I have blanks in my CSV file, this is because I still don't have any data to fill in those specific cells, this is going to affect my importing? Thank you!
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Hi there, yes it may affect your importing if the blanks cells contains unseen characters or spaces as it may be different from the data type you specify for the column. Try to clean your data as much as possible, then when you import your data try to use the update statement to set all blank cells to NULL and everything will be OK. Good luck and inform me with the updates!
@ashutoshkumartiwari3209
@ashutoshkumartiwari3209 11 ай бұрын
Is it possible to import data from excel to MYSQL on regularly ?
@ishanilahiri7387
@ishanilahiri7387 2 ай бұрын
It's impossible to import the CSV file in PGAdmin or MySQL Workbench. Can someone give the solution. It shows error in both environments.
@new_moon_12
@new_moon_12 Жыл бұрын
When I load the data infile, i'm getting this error Error: Data truncated for column 'sales' at row 1 Error Code: WARN_DATA_TRUNCATED How to deal with this? Also, when we save the file in csv format the datatype we changed does not save. How does mysql understand the datatype then?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Hello, Your problem can be because you use the actual delimiter of your file inside a certain column of the table. I mean that if you have a csv file (comma separated), the problem will occur if you have a comma inside any column other than the delimiter.
@new_moon_12
@new_moon_12 Жыл бұрын
That helped, I removed the column that contained commas. Thanks a lot. But I have a follow up question now. Say I have a column where there are multiple words separated by comma's (just like in the above case). How can I import or export such a file with such a column through MySQL One thing that I can think of is replacing the commas in the column with hyphen (or some other character). Do we have any better solution in this case?@@AnalyticsExplorers
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
@@new_moon_12 Great question! We surely have another better situation which is to convert the csv file to semi-colon delimited for example. Changing the delimiter will truly solve all your problems. Give it a try and inform me with the updates. Good luck!
@TejaVarma-p3b
@TejaVarma-p3b Жыл бұрын
When i clicked ctrl+enter this error is coming. Error Code: 29. File 'C:\ProgramData\MySQL\MySQL Server 8.0\Data\ProgramDataMySQLMySQL Server 8.0databasescustomers_dataset.csv' not found (OS errno 2 - No such file or directory). but the path is correct.
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Make sure not to use the symbol "\" between folders in the file path. Use either "/" or "\\".
@siddhantkrishali437
@siddhantkrishali437 Жыл бұрын
Can we also use this method for importing few columns, not the full table?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Yes! You simply can copy the specified columns to be imported and paste them into new separate file and save it as csv file to apply the video steps on it. Good luck!
@fatimaaitmalek1485
@fatimaaitmalek1485 Жыл бұрын
Thank you for this video, I have a large data and I devided the table in 2 parts but I still can not import data wat's wrong, it takes a long time without any result
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
What type of error do you face? Make sure to make the first part of the table with small records while using the data import wizard method to not consume a lot of time
@fatimaaitmalek1485
@fatimaaitmalek1485 Жыл бұрын
No error but the import seems very late or impossible, ok I will try that because thé first part is long
@Ankit_sharma24
@Ankit_sharma24 9 ай бұрын
I'm facing issue while importing CSV file but there is an error that it's is not accepting character like $€¥°^®© these are the charector is not accepting and showing error
@AGSfeel666
@AGSfeel666 Жыл бұрын
So, how to do it on a MAC? it's hidden in the system set
@martins__23
@martins__23 Жыл бұрын
Great video! Was struggling with a dataset
@suvarna625
@suvarna625 Жыл бұрын
Everything went well until the last step. While trying to execute load data I file step, getting error code 1290. Can anyone please help me with it.
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Hello Suvarna, You can find the solution in our short video here: kzbin.infon4xjOUnfOMY?si=rj1MxuCMHAI9lpQ5 Good luck and if you find it useful, don't forget to spread it with your colleagues!😀
@nazimbudaqov239
@nazimbudaqov239 Жыл бұрын
What if there is foreign keys in table in sql? Please answer
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Please try to explain your problem in more details
@nazimbudaqov239
@nazimbudaqov239 Жыл бұрын
@@AnalyticsExplorers there is csv file with more than million records. I need to import it to database with different tables (year,country, etc.). They are connected to data table in the same database with foreign keys and it has its own columns too. How i can import it. I tried with "load data infile" but it is too complicated situation for me.
@huguititi
@huguititi 7 ай бұрын
Thanks!!! the form of the videos and the step by step are really nice!!!
@Collinstobenna
@Collinstobenna Жыл бұрын
I have gone through all the steps, it's not returning an error, just '0 rows affected' I've done everything.
@Gksharma16706
@Gksharma16706 Жыл бұрын
Please confirm if any columns have blank space then will mysql successfully import data or not Becuase i have 1 million records to import and cant check each column for blank space
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
It depends on the type of the column being imported. If you are importing a string (Varchar) column it won't cause any problems but it can in case of integers for example. You can use excel function to clean the columns before import. For example, you can use the Trim function with numbers or integers to clean up any empty space which is unneeded.
@johnvak7390
@johnvak7390 Жыл бұрын
Why am i getting "OS errno 2 no such file found"? I deleted the secur-priv and saved csv in the correct schema i want it to upload. ahhhhhhhhhhhh
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Did you put your csv file in the correct directory?
@johnvak7390
@johnvak7390 Жыл бұрын
I think so. Program data - Mysql - mysql server 8.0 - data -tablename - table@@AnalyticsExplorers
@johnvak7390
@johnvak7390 7 ай бұрын
@@AnalyticsExplorers I forgot what I did; it's been a while, but it's fixed. Thanks for creating this video as my company has transitioned from ms access to an actualy rdbms
@ND-lf3rg
@ND-lf3rg 8 ай бұрын
HELLO i HAVE TRIED YOUR STEP BUT THEY ARE GIVING ME THIS ERROR: Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
@yatinyadav2283
@yatinyadav2283 Жыл бұрын
It cannot work for me. Any other suggestion for importing large data.
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Can you explain the problem you had in more detail?
@rinchendorji94
@rinchendorji94 8 ай бұрын
Is program file same as program data?
@markjustinsayson7595
@markjustinsayson7595 9 ай бұрын
how can I edit tha datas within the table?
@nehasahu1467
@nehasahu1467 25 күн бұрын
I am not getting the data folder in mysql
@ujasrudani
@ujasrudani 19 күн бұрын
Open Workbench Open the appropriate MySQL connection (the one you used to create the database) Open the "Management" tab in the Navigator (left pane) Open "Server Status" under "Management" to view information about your MySQL server Note the "Data Directory" path on that page
@AbhishekNavle-e6r
@AbhishekNavle-e6r Жыл бұрын
I am facing error while I write the "LOAD DATA INFILE 'abc.csv' INTO abc FIELDS TERMINITED BY ',' IGNORE 1 LINES;" the error is Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'olist_orders_dataset FIELDS TERMINITED BY ',' IGNORE 1 LINES' at line 1 Please assist
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Hi, Hope you are doing well. This is just a syntax error Write your query as follows "LOAD DATA INFILE 'abd.csv' INTO TABLE abc FIELDS TERMINATED BY ',' IGNORE 1 LINES;" Hope it will help. Inform us with the updates!
@AbhishekNavle-e6r
@AbhishekNavle-e6r Жыл бұрын
@@AnalyticsExplorers thanks a lot but now another problem has occured. I am getting - Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement Please assist
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
@@AbhishekNavle-e6r You need to go to MYSQL Workbench and write "SHOW VARIABLEA LIKE "secure-file-priv" This will return one row with 2 columns, in your case, you will a path in the second column. You have to go to ProgramData folder in local disk C then go to MYSQL then MYSQL server and there you will find a file named 'my'. Open it in Notepad and using ctrl+F for "secure-file-priv" delete the path written and leave it with empty string. Then, you need to restart your device and here you can go ahead and import your data successfully. Good luck and please inform me with the updates!
@AbhishekNavle-e6r
@AbhishekNavle-e6r Жыл бұрын
@@AnalyticsExplorers After that I got this - Error Code: 1265. Data truncated for column 'payment_value' at row 1
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
@@AbhishekNavle-e6r This is because of the wrong data type of the payment_value Column What is the data type of this column in the database?
@okonkwochukwuebuka2645
@okonkwochukwuebuka2645 Жыл бұрын
I keep having this error, how do I fix it Error Code: 2068. LOAD DATA LOCAL INFILE file request rejected due to restrictions on access
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Hi, sorry for our late reply. Your problem can be solved through the following steps: 1- open MYSQL workbench 2- Go to the connection Tab. 3- Right Click and choose Edit Connection 4- Go to the "Advanced" Sub Tab 5- you will find a box "Others", Copy this sentence "OPT_LOCAL_INFILE=1" and paste it there. 6- Restart your device. Now, your problem should be solved. Good luck and inform us with the updates.
@moizfarooqui1927
@moizfarooqui1927 Жыл бұрын
what if we have 300+ columns of data then it wont be easy to writ a create table statement to create an empty table. any alternative?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
You can do something good. you can divide your table into 2 parts, one part contains the columns' titles and few rows and the other part contains the remaining rows. You can use the Table Data import wizard method to quickly import the first small part where MYSQL will define all columns data types by itself "You can watch this method's steps on my Channel by the way". Now you have the table created and its columns are well defined. You can use this video method (LOAD DATA INFILE STATEMENT) to import the second remaining part. Good Luck!
@moizfarooqui1927
@moizfarooqui1927 Жыл бұрын
@@AnalyticsExplorers giving error Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
@moizfarooqui1927
@moizfarooqui1927 Жыл бұрын
@@AnalyticsExplorers i foolowed your program data notepad solution but doesnt allow me to save as it is editable by administrator only
@zacharybaca6276
@zacharybaca6276 Жыл бұрын
I am working on the Google analystics Case Study, there are over 1million rows in some of the CSV files. When I use MYsql Workbench to upload, this takes several hours. Is that normal?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
1 million rows can be very large number indeed, but I guess several hours is a very big. You may divide the file into parts and load every part separately. Make sure to use the load data infile statement or pandas method
@suchismitasahoo9984
@suchismitasahoo9984 Жыл бұрын
Everything worked fine until when I go to Program Data-- My SQL-- My SQL Server-- Data. Data folder is not opening only... What could be the reason ?
@AnjanaTV-ww1lt
@AnjanaTV-ww1lt Жыл бұрын
I got the same problem. Instead of opening the Data folder directly, follow the same path as he showing in the video. i.e, Excel file -- save as -- local disk c -- programdata -- mysql -- mysqlserver 8.0 -- Data . Then there will be a dialog box appear for getting the access . click yes. then we can open data folder .
@indykoncepts2878
@indykoncepts2878 7 ай бұрын
Thank you for this. This is helpful. However, I have been having error 1050. Table hotel_bookings already exists
@anyasibamidele8488
@anyasibamidele8488 Ай бұрын
Please mine us not still working
@piyushsharma-q5z
@piyushsharma-q5z Жыл бұрын
load data infile 'game set.csv' into table gameset Fields terminated by ',' ignore 1 lines; i got error 1290
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Hi there, You need to go to MYSQL Workbench and write "SHOW VARIABLEA LIKE "secure-file-priv" This will return one row with 2 columns, in your case, you will a path in the second column. You have to go to ProgramData folder in local disk C then go to MYSQL then MYSQL server and there you will find a file named 'my'. Open it in Notepad and using ctrl+F for "secure-file-priv" delete the path written and leave it with empty string. Then, you need to restart your device and here you can go ahead and import your data successfully. Good luck and please inform me with the updates!
@suvarna625
@suvarna625 Жыл бұрын
Couldn't execute Show variable like "secure-file-priv" because of the red line under variable.
@moussaallili3101
@moussaallili3101 Жыл бұрын
what if there is 50 columns typing every one would be very annoying . is there a better way of doing it ?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
You can do something good. you can divide your table into 2 parts, one part contains the columns' titles and few rows and the other part contains the remaining rows. You can use the Table Data import wizard method to quickly import the first small part where MYSQL will define all columns data types by itself "You can watch this method's steps on my Channel by the way". Now you have the table created and its columns are well defined. You can use this video method (LOAD DATA INFILE STATEMENT) to import the second remaining part. Good Luck!
@taniaadeoti4678
@taniaadeoti4678 Жыл бұрын
The second part will be seen as another table?
@bhavya.76
@bhavya.76 7 ай бұрын
I am getting an Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement. pls help
@swethabalaji3566
@swethabalaji3566 3 ай бұрын
hi i have same problem,can you solved it?
@bhavya.76
@bhavya.76 3 ай бұрын
@@swethabalaji3566 yeah sure, i will give a try
@bhavya.76
@bhavya.76 3 ай бұрын
@@swethabalaji3566 yeah sure, i will give a try.
@bhavya.76
@bhavya.76 2 ай бұрын
@swethabalaji3566 yeah sure, I will give a try.
@d3vilscry666
@d3vilscry666 Жыл бұрын
What if I have multiple tables? I have a large csv and my database has 9 tables. How do I go about inserting the appropriate data into the right tables?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
You have to repeat the process explained in the video for each table until you insert all tables. If you have some tables with few rows, you can use another quick method which is the table data import wizard. You can find its explanation in another video on my channel. During importing, make sure to start by the tables with minimum dependents. For example, if you have 2 tables. One has only a primary key and the other has a primary and foreign key. You must begin by importing the first. Good luck!
@oluwatoyinogunyemi
@oluwatoyinogunyemi Жыл бұрын
how can I get access to the server, I tried saving a file as you explained but it keeps saying I should contact the administrator to obtain permission. thanks
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Try type the statement as follows: LOAD DATA LOCAL INFILE 'file path on your computer without moving it to the server as in the video' into table The error should go away Good luck
@oluwatoyinogunyemi
@oluwatoyinogunyemi Жыл бұрын
@@AnalyticsExplorers thanks for the response but where should i type it? on workbench or command prompt.
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
@@oluwatoyinogunyemi on MYSQL Workbench And don't forget to enter the full path of the file and replace all '/' with '//' or '\'
@oluwatoyinogunyemi
@oluwatoyinogunyemi Жыл бұрын
@@AnalyticsExplorers 0 16 00:26:24 LOAD DATA INFILE "C:\\Users\\Oluwatoyin\\Downloads\\SuperStoreOrdersdatas.csv" INTO TABLE store_wd FIELDS TERMINATED BY ',' IGNORE 1 LINES Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 0.015 sec this is the error message i got. please help out. thanks
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
@@oluwatoyinogunyemi You need to go to MYSQL Workbench and write "SHOW VARIABLEA LIKE "secure-file-priv" This will return one row with 2 columns, in your case, you will a path in the second column. You have to go to ProgramData folder in local disk C then go to MYSQL then MYSQL server and there you will find a file named 'my'. Open it in Notepad and using ctrl+F for "secure-file-priv" delete the path written and leave it with empty string. Then, you need to restart your device and here you can go ahead and import your data successfully. Good luck and please inform me with the updates!
@shynarakhmetova7940
@shynarakhmetova7940 Жыл бұрын
Thank you greatly for your explanation! I have one problem running the last bit of code - it generates this error: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement. Maybe you know anything about this? I'd be very grateful for any suggestions!
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Thank you very much for your feedback and support! You need to go to MYSQL Workbench and write "SHOW VARIABLEA LIKE "secure-file-priv" This will return one row with 2 columns, in your case, you will a path in the second column. You have to go to ProgramData folder in local disk C then go to MYSQL then MYSQL server and there you will find a file named 'my'. Open it in Notepad and using ctrl+F for "secure-file-priv" delete the path written and leave it with empty string. Then, you need to restart your device and here you can go ahead and import your data successfully. Good luck and please inform me with the updates!
@FUCKdarshan
@FUCKdarshan Жыл бұрын
​@@AnalyticsExplorers I am getting the below error when tried to save the doc after assigning secure-file-priv to empty string: "You don't have permission to open this file. See the owner of the file or an admin to obtain permission"
@4everSoccer4life
@4everSoccer4life Жыл бұрын
Question, did you have to modify the config file for the secur file to an empty string?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Yes, this is to avoid the secure file priv error while importing
@MDCRITICA
@MDCRITICA Жыл бұрын
2 IMPORTANT ISSUES: 1) You start showing that your CSV is already loaded in Excel, but what if it is in a different format? How to save it as a CSV making sure that data is changed properly? 2) What if I can't open the CSV cause it is heavy? How to load and change the DATE FORMAT without using excel ?????
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Hello, Actually this video is not intended for how to deal with csv files problems. As the video title indicates, it's mainly for the import process to MYSQL. Hope you got me.
@MDCRITICA
@MDCRITICA Жыл бұрын
@@AnalyticsExplorers And this is exactly my issue. I'm doing what you say in the video and it is not allowing me to import. Range issue, date type issue, no info in 1st row issue, etc. Thanks for your reply!
@askinprasad4489
@askinprasad4489 Жыл бұрын
how to load csv file having blank cells
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Hi there, While you are creating your table using the create table statement, if you have a column with empty cells make its datatype as text. After you already imported your table, use the update statement to replace any empty cell by NULlL as (Update [tablename] Set [Columename] = NULL Where [Columnname] = "") After that you can change your column datatype to the right type you want. Best of luck!
@mayankahuja9
@mayankahuja9 Жыл бұрын
finally i got what i was looking ffrom past 3 hours! doubt: i have imported data first, how can i assign datatype to the columns?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
You can find the detailed steps to modify your columns datatype in this link www.w3schools.com/sql/sql_alter.asp
@kambalasantosh
@kambalasantosh Жыл бұрын
Thank you so much i needed it. Its impressive, good job. very good way to explain.
@davidobaita5169
@davidobaita5169 Жыл бұрын
This is so helpful, thank you so much. God bless you.
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Thanks aĺot for such feedback
@muthu8025
@muthu8025 Жыл бұрын
Hi, does it work for 1millon records too?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Yes for sure! It can work for any quantity of records
@safutayar3288
@safutayar3288 Жыл бұрын
that make insert or restore?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Can't understand your question, please clarify!
@Ris5678X
@Ris5678X Жыл бұрын
can DBeaver do this ?
@marcopecorale2221
@marcopecorale2221 9 ай бұрын
Thank you so much, you solved my problem !!!!
@Emotion-od8ob
@Emotion-od8ob 5 ай бұрын
U got new subscriber 🎉
@abdmuhaimin
@abdmuhaimin Жыл бұрын
wow amazing. but i wish mysql can crate table from file csv
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Actually mysql can build table from a csv file using the table data import wizard methodology. If you're interested to know how, go watch our first video in MYSQL playlist
@abdmuhaimin
@abdmuhaimin Жыл бұрын
@@AnalyticsExplorers wow
@ogundijitomisin6552
@ogundijitomisin6552 Жыл бұрын
Hi. Thanks for the video. But MySQL gave this error - "Error Code: 1290 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement" How can I fix this?
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Hi there, You need to go to MYSQL Workbench and write "SHOW VARIABLEA LIKE "secure-file-priv" This will return one row with 2 columns, in your case, you will a path in the second column. You have to go to ProgramData folder in local disk C then go to MYSQL then MYSQL server and there you will find a file named 'my'. Open it in Notepad and using ctrl+F for "secure-file-priv" delete the path written and leave it with empty string. Then, you need to restart your device and here you can go ahead and import your data successfully. Good luck and please inform me with the updates!
@ogundijitomisin6552
@ogundijitomisin6552 Жыл бұрын
@@AnalyticsExplorers Hello. I solved it on Friday, and It was as you said. But nevertheless, I'm so much grateful. Thanks for this video.
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Thanks for your feedback and sorry for our late reply
@ogundijitomisin6552
@ogundijitomisin6552 Жыл бұрын
@@AnalyticsExplorers Not at all. We should be thanking you. This video is a gift. You don't know a great help this video is to those who use MySQL. Thanks so much once again.
@prashantgupta6850
@prashantgupta6850 Жыл бұрын
@@AnalyticsExplorers Thank you foe this Solution I was also getting secure-file-priv error its fixed now but now I am getting new error : Error Code: 29. File 'C:\ProgramData\MySQL\MySQL Server 8.0\Data\printify\orders1.csv' not found (OS errno 2 - No such file or directory) Even I can see the file exist in this location . Kindly Help Your Quick response will be appreciated. Thanks
@sharath957
@sharath957 Жыл бұрын
Thanks for making this video.
@Magistrado1914
@Magistrado1914 10 ай бұрын
Excellent.
@AnalyticsExplorers
@AnalyticsExplorers 10 ай бұрын
Thank you for your feedback🙏
@sarahvy
@sarahvy Жыл бұрын
THANK YOU SO MUCH!
@JamieLavers
@JamieLavers Жыл бұрын
THANK YOU!!!
@Manish-qt4lp
@Manish-qt4lp Жыл бұрын
Thanakxx
@pravashpinku8106
@pravashpinku8106 9 ай бұрын
nicee
@gaurabparajuli3643
@gaurabparajuli3643 4 ай бұрын
wow
@pawanchoudhary619
@pawanchoudhary619 Жыл бұрын
Getting this Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 0.234 sec
@AnalyticsExplorers
@AnalyticsExplorers Жыл бұрын
Hi there, You need to go to MYSQL Workbench and write "SHOW VARIABLEA LIKE "secure-file-priv" This will return one row with 2 columns, in your case, you will a path in the second column. You have to go to ProgramData folder in local disk C then go to MYSQL then MYSQL server and there you will find a file named 'my'. Open it in Notepad and using ctrl+F for "secure-file-priv" delete the path written and leave it with empty string. Then, you need to restart your device and here you can go ahead and import your data successfully. Good luck and please inform me with the updates!
@amitmaurya6162
@amitmaurya6162 Жыл бұрын
While writing query show variable like "secure-file-priv" I'm getting 0 rows returned
@amitmaurya6162
@amitmaurya6162 Жыл бұрын
With 2 columns variable _name and value
@amitmaurya6162
@amitmaurya6162 Жыл бұрын
After making changes in my .in I'm getting the same error
@MissP3224
@MissP3224 6 ай бұрын
But Excel can't load the huge file to clean it there🥲
@Sprinkle-ru3eb
@Sprinkle-ru3eb 10 ай бұрын
Hey I am getting error while importing " the MySQL server is running with the -secure-file-priv option so it cannot execute this statement
@Sprinkle-ru3eb
@Sprinkle-ru3eb 10 ай бұрын
Help me
@AnalyticsExplorers
@AnalyticsExplorers 10 ай бұрын
@@Sprinkle-ru3eb Hello, You can find your problem solution in this short video kzbin.infon4xjOUnfOMY?si=3jVUpEcwlGMheR-w Best of luck!
@frederickjabagat6765
@frederickjabagat6765 7 ай бұрын
Error Code: 1292. Incorrect date value: '2020' for column 'date_added' at row 1 I still keep getting this error even thought I updated my data dates from yyyy-mm-dd
I loaded 100,000,000 rows into MySQL (fast)
18:27
PlanetScale
Рет қаралды 181 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
Querying 100 Billion Rows using SQL, 7 TB in a single table
9:07
Arpit Agrawal (Elastiq.AI)
Рет қаралды 58 М.
Learn SQL In 60 Minutes
56:24
Web Dev Simplified
Рет қаралды 2,2 МЛН
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 226 М.
Learn SQL Basics in Just 15 Minutes!
16:57
Kenji Explains
Рет қаралды 196 М.
Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
28:34
Decomplexify
Рет қаралды 2,2 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН