Tuesday, November 22, 2011

mysqldump

Transferring data between two tables/two databases can be achieved by

insert into table1 select * deom database2.table2;

But they are not on the same host you can use following :

$ mysqldump -h host_name -u user_name -p database table_name "--where= date = 20111121" > temp

We can use "-t" option which will exclude table creation definition from the output.