This is a job for LOAD DATA INFILE. Because the fields in your input file are not delimited by commas, tabs, or similar you need to use an uncommon feature called input preprocessing.
Giving this SQL statement to a command-line mysql client will work.
LOAD DATA INFILE '/tmp/data.txt' INTO TABLE tbl (@line)
SET year = SUBSTRING(@line, 1, 4),
month = SUBSTRING(@line, 5, 2),
day = SUBSTRING(@line, 7, 2),
day_in_letters = SUBSTRING(@line, 9);
This loads each row in turn of the named file into a temporary variable @line
, then extracts a substring for each column.
But, Pro tip, it is far better data design practice to put calendar dates into DATE columns (or TIMESTAMP or DATETIME columns) rather than designing your own way of representing calendar dates. MariaDB and MySQL have comprehensive and completely debugged date-arithmetic features.