I am having some problems with mysql importing text into a database. My .txt file looks like this:
a.txt
Pattern: 1
Address: 18PhQkzkzP6QUmWuiddhJ2YrGKZKRmV3j
Privkey: 5JRpLiEcq57ijgfVGmmE19V1F29zPkwWjTQinJJJpfYtqA3ZcbY
Pattern: 1
Address: 18zvgu7k8WxAnwgghdudhdzYRCo7aEVPBUU
Privkey: 5JmAp8QgujxDhwJHwgkW9FkiuWEkSDwZL73Xu8ihAY2fy3Kjmn3
etc....
I want to import this txt. file into a database called bitcoin with the table a from a.txt.
All lines from the "Pattern: 1"
should disappear and the table "a" should only have two columns:" address and privkey" which address as the prim. key.
mysql> LOAD DATA LOCAL INFILE "/home/weber/Desktop/a.txt" INTO TABLE a
-> FIELDS TERMINATED BY ':'
-> LINES STARTING BY 'Address'
-> IGNORE 1 LINES;
Seems not working very well, anyone with some mysql knowledge could give me a hint, thanks.