how to import txt to mysql direct or through php
问题 I need to import my .txt to MySQL ` which has only one field like this I have tries this many way but failed :( Could you help me please If any have idea with php that is also acceptable. I spend two for this unfortunately not succeeded yet :( Thanks in advance 回答1: You can use Mysql LOAD DATA LOCAL INFILE syntax LOAD DATA LOCAL INFILE '/path/to/file.txt' INTO TABLE 'table1' LINES TERMINATED BY '\n' For this, make sure Mysql has access to /path/to/file.txt . Also the user who is executing the