Migrating table data from a MySQL database to another MySQL database -


i'm having trouble understanding how works. know can migrate new database mysql through of workbench's tools, want here, data tables of database insert own database. issue other database not have same tables or same amount of data. of useless me, of doesn't fit tables.

so how 1 regularly around doing this? need can capture data, no matter how may have been arranged in past, , place database. sounds hard when program doesn't know expect, issue. i'd appreciate if point me in right direction.

can't do? perhaps missed somthing

-- first create new table, avoid columns don't care about.     create table newtable......  -- select old table columns need , insert them in new table     insert newtable(col1, col2, col3) select col1, col2, col3 oldtable ..... 

and if want merge data between multiple columns use concat_ws

   insert newtable(col1, col2, col3) select concat_ws(' ', col1, col2) col1, col3 oldtable ..... 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -