I copied my file to the location where MySQL has access to.
To know the location I used:
select @@secure_file_priv;
and it gave me /var/lib/mysql-files/
.
Nothing else worked: neither turning off apparmor, nor changing ownership and permissions, nor merely granting the file
privilege. So I rolled back most of that but the right directory still works. In my case.
My source is Raymond Nijland, here: https://dba.stackexchange.com/questions/190380/load-file-producing-null