MySQL data movement

I have a MySQL database with some data.

I need to transfer this data between databases with almost the same tables, but different with table and field names.

The data in both databases is the same, only the table names (and some field name / type) are changed. But they are not exactly the same. I deleted some fields from the tables and moved the fields to another table.

How can I achieve this without making a script to iterate through each record and insert them into a new database? Any tool?

+4
source share
1 answer

Use mysql_dump to create a .sql file that has all the queries necessary to recreate the database and its contents. Then you can edit this .sql file to change the names of tables and fields to reflect the new database setting.

+4
source

All Articles