New to MYSql - copy table data from one schema to another with new tables

I am new  to MySQL  - looking for the easiest approach to moving data from one schema to another - with limited tables.

I already created blank tables with indexes and now I need to import or copy the data from the old schema.  What is the best approach?
Karen SchaeferBI ANALYSTAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
>>easiest approach to moving data from one schema to another

in MySQL? then probably you can try the MySQL Workbench's migration wizard.

just follow the steps provided in the wizards or referring to the articles below:

10.8 Using the MySQL Workbench Migration Wizard
https://dev.mysql.com/doc/workbench/en/wb-migration-wizard.html

you can download MySQL Workbench from MySQL website:
http://dev.mysql.com/downloads/workbench/
0
Karen SchaeferBI ANALYSTAuthor Commented:
How can I limit which tables to include in the migration.  My second db has only a few tables compared to the original?
0
Karen SchaeferBI ANALYSTAuthor Commented:
How do I create a new schema, transfer certain tables with indexes, columns, & data from old schema to new schema.

What is the simplest approach.  I tried Migration wizard without success - Migration fails part way thru the process?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
>>How do I create a new schema, transfer certain tables with indexes, columns, & data from old schema to new schema.

if the wizard in MySQL Workbench doesn't fulfill your needs, you can actually export your current database to a .sql script instead, from there see if you can amend accordingly.

Alternatively, you may also look for the mysqldump command:

4.5.4 mysqldump — A Database Backup Program
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

>>I tried Migration wizard without success - Migration fails part way thru the process?
it works for me when I need to fransfer/backup my data from Internet to my local machine, and vice versa using MySQL Workbench.
0
Tomas Helgi JohannssonCommented:
Hi!

The simplest way is to use mysqldump.
If you have already created the schema (database and tables ) you dump only the data like this

mysqldump --no-create-db --no-create-info -u username -p db_name table1_name table2_name table3_name > dump.sql

then edit the file (change the schema) and issue
mysql -u username -p < dump.sql

Or you could do it like this

mysqldump --no-create-db --no-create-info -u username1 -p pass1 db_name1 table1_name table2_name table3_name | mysql --host=destination_host -u username2 -p pass2 -C db_name2  table1_name table2_name table3_name

http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html

Regards,
     Tomas Helgi
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Karen SchaeferBI ANALYSTAuthor Commented:
Thanks for the great input.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.