Can any body tell me how to accomplish this?

I have a remote table from which I need to import part of the data and put it into a table on my computer(local). I know select into command and its use but I don't know how to use it for this kind of situation.

2 Answers 2


Try this from your local machine:

mysqldump -u username -p password -h remote_host --databases remote_database --tables remote_table --where="id=757575" | mysql local_database -u username -p password

To export the data from a remote table use below command you can also use where clause in it if u need specific data.

select * from tablename into outfile '/etc/tablename.csv';

use mysql>show create table tablename;

copy the create table statement and create a table in your local PC then Copy that 'tablename.csv' file from remote to your local computer. and use below to import data.

load data local infile '/etc/tablename.csv' into table tablename;

Any Issues let me know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.