1

I have an Excel document (15KB) extracted as .CSV from a monitoring platform that uses 1 column ip address but contains 1048576 Rows.

  • how do I insert all this data in my MYSQL database?

also, I have 10 of these excel documents each document maximizes the excel total rows. so I have a total of 10485760 rows to insert.

  • is MYSQL the appropriate database to use?

I need to check these data from time to time, but im not sure where to store them and look/search for a specific row easily when I need to.

p.s: I don't work for the NSA

1 Answer 1

2

First is you have to open your command prompt, and then type:

mysql -u root -p

and then type the password. After that use your desired database like this:

use (yourdatabase);

and then type this:

LOAD DATA LOCAL INFILE 'C:\\folder\\Filename.csv' INTO TABLE tbl_name FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'

I always use this when inserting very huge rows in mysql

Sign up to request clarification or add additional context in comments.

2 Comments

after entering the above code, i get this -> symbol. not sure what i miss here.
thank you for this, what i did was to paste the code inside my PHPMYADMIN SQL tab instead of typing it on my cmd :) thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.