# Loading data from file with mysql

**URL:** <https://www.ruby-forum.com/t/loading-data-from-file-with-mysql/59778>\
**Category:** Ruby\
**Created:** [May 6, 2006, 11:59am UTC](https://www.ruby-forum.com/t/loading-data-from-file-with-mysql/59778 "2006-05-06T11:59:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdruse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@jdruse](https://www.ruby-forum.com/u/jdruse)\
**Post date:** [May 6, 2006, 11:59am UTC](https://www.ruby-forum.com/t/loading-data-from-file-with-mysql/59778/1 "2006-05-06T11:59:48Z")

</div>

I’m trying to load a tab delimited .txt file into a mysql table. I set  
the OPT\_LOCAL\_INFILE option but the query only reads the first line of  
the .txt file. If I run the same command as a batch file in mysql the  
entire file is read. Any thoughts?

jon
