0

Hello,
I have two mysql db which contains 23 tables. The problem is that i have merge them in a one db. Is it possible?
Thank you!

4
Contributors
7
Replies
8
Views
9 Years
Discussion Span
Last Post by dickersonka
0

are they completely separate or they both contain the same tables?

might want to take a look at mysqldump and mysqlimport

0

Export one table, then import it in the other database....
If you are using PHPMyAdmin then follow the below:
OK. 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

Done

0

they are contains same tables. I have tried to use export and import. But the problem is that there are fields for example article id. phpmyadmin gives duplicate id error.

0

the problem is not the name of tables.
the problem is there are primary keys and also some tables connected with other tables
thus i could make import directly.

0

one option if you are dealing with duplicate id's is to create two tables in the same database, then create your queries to select into or update based upon a duplicate id

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.