MySQL Forums
Forum List  »  MySQL Workbench

Re: importing table dump from another machine
Posted by: Mike Lischke
Date: November 18, 2010 03:01AM

Monte,

I don't really understand why you have gone through all that. Why didn't you add the "create database world; use world;" in the script right from the start? When you dump a database this is added automatically. If you don't have that then you cannot expect that the importer works properly. Also on the command line when you use "mysql -u root -p < script.sql" you have to give it a schema to work on.

For importing a database dump you don't need to model a schema. First you should understand what the difference is between database modelling and working with a live database. Modelling is a design task, you create a *model* of your schema you will once have in your database server (somewhen in the future or even never). That doesn't mean that you get it physically there if you are still in the design phase. Hence it is completely wrong to use modelling when you just want to import data. For quickly creating an empty database use the SQL IDE and do it.

Note: the SQL does not refresh its list of objects automatically, you have to refresh it manually (right click in the tree -> "Refresh All").

Mike

Mike Lischke, MySQL Developer Tools
Oracle Corporation

MySQL Workbench on Github: https://github.com/mysql/mysql-workbench
On Twitter: https://twitter.com/MySQLWorkbench
On Slack: mysqlcommunity.slack.com (#workbench)
Report bugs to http://bugs.mysql.com
MySQL documentation can be found here: http://dev.mysql.com/doc/refman/8.0/en/

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: importing table dump from another machine
1869
November 18, 2010 03:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.