MySQL Forums
Forum List  »  MySQL Workbench

Re: importing table dump from another machine
Posted by: Monte Milanuk
Date: November 16, 2010 02:18PM

Hello Mike,

Where I seem to be running aground is when I'm in that 'Import From Disk' dialog and I select the sql file (just for this example lets say I'm using the world.sql file for the sample db 'world') and click 'Start Import'... WB responds:

"ERROR 1046 (3D000) at line 22: No database selected"

Fine. So I open the script in a text editor and add "USE world;" to the beginning and run it again:

"ERROR 1049 (42000) at line 7: Unknown database 'world'"

Prior to this I (re)read the 'Getting Started' tutorial in the MySQL Workbench manual, and worked through the examples described therein with no issues***. I went back, created a new EER model, named the schema 'world', set up the db connection, went through the 'forward engineer' business with no error messages, etc. and though I was good to go.

Now things get more interesting... it appears that somewhere along the way I managed to get WB to use the right db. I was trying different things in the Database->Query, Database->Forward Engineer menus, but I can't say which thing it was that did it :( The good news is,now it doesn't return any errors when I try to import the sql file:

"12:02:41 Import of E:\Documents\Computers\sample SQL databases\world-db\world.sql has finished"

But still nothing shows up under the EER model 'world' - no tables, nothing. I double checked from the mysql console and that db *is* there, tables and all.

I really like the overall look and feel of Workbench, but so far I'm more frustrated with it than I can put into words. How did:

mysql -u root -p
CREATE DATABASE world;
USE world;
SOURCE world.sql;

get to be such an ordeal?


***No issues other than the EER diagram was borderline useless because of black headers on all the table objects render them completely unreadable.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: importing table dump from another machine
8277
November 16, 2010 02:18PM


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.