I need to import my text file to MySQL which has only one field. It is like this:

I could also do this with PHP.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Mysql LOAD DATA LOCAL INFILE syntax
For this, make sure
Mysqlhas access to/path/to/file.txt. Also the user who is executing the query must have FILE privilege.With Pure PHP its easy. Read the file, build the query, execute it.
You need to build the query so that you dont end up looping query which is slow.