Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

can any body tell me. I have a remote table from which I need to import part of the data and I need to place into my table which is in my computer(local). I know select-into command and its use but dont know use it for such kind of situations.

Thanks in advance

share|improve this question

migrated from Dec 17 '12 at 15:24

This question came from our site for system and network administrators.

up vote 3 down vote accepted

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
share|improve this answer
Thanks for the format, Rolando. – Valerie Parham-Thompson Dec 18 '12 at 3:39
thank you.......! – Chella Dec 18 '12 at 4:31

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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