I have two database ms1 and ms2 with same fields and same tables. i want to merge both data from ms1 to ms2. as i have same primary keys.
Anybody have idea?
I have two database ms1 and ms2 with same fields and same tables. i want to merge both data from ms1 to ms2. as i have same primary keys.
Anybody have idea?
Export one table, then import it in the other database....
For example, database name: db1 and db2
The table name is tb.
Export table
1) Use phpMyAdmin, select db1
2) Click Export
3) Select db table
4) unselect Structure
5) check Save as file
6) Click Go
Import table
1) Use phpMyAdmin, select db2
2) Select db table
3) Click Import
4) Browse your exported file
6) Click Go
Follow steps stated by @Sevak.
Export db2 table with structure and import it in db1 in a temporary table with same schema.
Now run query:
insert into table1 (all columns except primary_key)
select all_columns_except_primary_key
from temporary_table;
Delete temporary_table if everything is ok.