Question: I have a data file where some rows are comment lines starting with %. How to load data from such a file into a mysql table?

Answer: 
Ah. No. From the [spec](http://dev.mysql.com/doc/refman/5.5/en/load-data.html) for the command there is no way to get it to ignore lines starting with a specific character. You can skip a certain number of lines, but that's the best you can do.

You'll want to preprocess the file. Or tell whoever is generating it to stop putting that in place.
On Mac/Linux

```
grep -v '^%' datafile | mysql ....

```

On Windows

```
findstr /v ^% datafile | mysql ....

```