Many of my clients have told me that they do not like using the LOAD DATA INFILE statement and prefer to manually parse and load the data. The main reason they do it is issues with the character sets, specifically UTF8MB4 and the load data infile. This was surprising to me as nowadays everyone uses UTF8. MySQL 5.7 (as well as 5.6) has full support for UTF8MB4, which should fix any remaining issues (i.e., you can now load new emoji, like ).
Last week I was investigating an interesting case where we were loading data and got the following error:
mysql -e 'select version()' +-----------+ | version() | +-----------+ | 5.7.12 | +-----------+ $ mysql -vvv testdb < load_data.sql ERROR 1300 (HY000) at line 1: Invalid …[Read more]