How can I load data from a text file into table?

You can use Load Data INFILE file_name; syntax to load data from a text file. but you have to make sure that.

(a) data is delimited

(b). columns and data matched correctly.