How to import text files in to mysql database

28 views
Skip to first unread message

chandu.pr...@vit.ac.in

unread,
Oct 14, 2015, 1:39:51 PM10/14/15
to jwpl-users
guys can you explain the steps to upload txt files in to database.
Message has been deleted

chandu.pr...@vit.ac.in

unread,
Oct 14, 2015, 3:07:15 PM10/14/15
to jwpl-users

I have seen a import statement in one of the post by oliver ferschke. I am using mysql 5.6.26-log MySQLCommunity Server(GPL) version

mysqlimport -uUSER -hHOST -p --local --default-character-set=utf8 DATABASE_NAME `pwd`/*.txt

here are the parameters :
user = root
host = localhost
password=Ch@n1234
databasename =wikipedia

i didnt understand the `pwd`/*.txt thing in the query

Can you give a sql query  with all these details given above.

please help me with this thing


-Chandu Prakash

xavier sumba

unread,
Feb 3, 2016, 12:12:54 AM2/3/16
to jwpl-users
Hello Chandu,

This means `pwd`/*.txt (print working directory) and it's the path of your files in the output folder.

I used this line to import text files: 

mysqlimport -uroot -p --local --default-character-set=utf8 wiki_dumps $wikipedia_path/dumps/en/20160113/output/*.txt



Hope solve your problem.

Cheers.
Reply all
Reply to author
Forward
0 new messages