Use LOAD DATA to load a file into a database other than the current one, you can qualify the table name with the database name.
mysql> LOAD DATA LOCAL 'mytbl.txt' INTO TABLE other_db.mytbl;