Partial copy of huge database
mysqldump -h source_server... --order-by-primary --where='id &gt; ...' src_db, tbl  |
    mysql -h dest_server ...


But that assumes


id is the PRIMARY KEY
You can get the id 100K (or so) rows from the end:  SELECT id FROM tbl ORDER BY id DESC LIMIT 100000, 1
You can access both servers from wherever you run the pipeline.


Since you need 2 connections, there is no 'simple' way to do it from the mysql commandline tool or from client code (PHP, Java, etc).  Copying one row at a time would quite slow.  Employing LOAD DATA will be no better than mysqldump + mysql.