Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > MySQL > How do I load a dump please

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-12-04, 09:05
JohnStrecker JohnStrecker is offline
Registered User
 
Join Date: Sep 2004
Posts: 39
Unhappy How do I load a dump please

Hi! I believe I have lost enough time with this one

I can get a dump file (dump.sql) from my server and I want to upload the data on my laptop. I am told to type

SHELL>mysqlimport db_name dump.sql

First question : how do I get to SHELL> ? All I seem able to get is either C:\MySQL\BIN> or mysql>

Second question : Once I am there - if I need to be there that is - how do I exactly type the command in order to avoid the infamous "ERROR 1064 You have an error in your SQL syntax." ?

Third question : does anyone have a sugggestion about a CLEAR AND SIMPLE book on MySQL which would be "the unchallenged reference" please ?

Many thanks for even one reply to one of the above questions

John
Reply With Quote
  #2 (permalink)  
Old 09-12-04, 13:03
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 9,572
My guess would be that you have different versions of MySQL on your server and your laptop. At first glance, it would seem that the server side is a more recent release than the laptop, and that it might contain some SQL features not supported by the laptop, or possibly that the server side is using one database engine (such as Innodb) and the laptop is using a different engine (such as isam).

-PatP
Reply With Quote
  #3 (permalink)  
Old 09-12-04, 15:24
JohnStrecker JohnStrecker is offline
Registered User
 
Join Date: Sep 2004
Posts: 39
I have MySQL 4.0.20 n my laptop. Is there a more recent version ?

Does the version have anything to do with how to access SHELL> ?

Thanks for your guidance
Reply With Quote
  #4 (permalink)  
Old 09-13-04, 08:39
RBARAER RBARAER is offline
Registered User
 
Join Date: Aug 2004
Location: France
Posts: 754
Hello,

"SHELL>" is just like dos "c:\", but it is a more general way to put it, so that it can be applicable to other operating systems. So, either go to your mysql "bin" subdirectory (which seems to be C:\MySQL\BIN), or go anywhere if you have C:\MySQL\BIN in your PATH environment variable. Then, on your laptop, type :

mysqlimport db_name dump.sql

where db_name is the name of the database on your laptop you want to import data into. I think you should have created a database on your laptop before doing the import, but I'm not sure (I've never tried to import data with mysql).

Regards,

RBARAER
Reply With Quote
  #5 (permalink)  
Old 09-13-04, 10:59
JohnStrecker JohnStrecker is offline
Registered User
 
Join Date: Sep 2004
Posts: 39
Thanks RBARAER! It took a while to process your suggestion - God! DOS seems so far back in time - and realise mysqlimport only processes one table at a time.

Now that I at last know what SHELL> means I eventually used

shell> mysql db_name < dump.sql

and Lo and Behold!

It worked !

Second time you're helping me out, for which many thanks.

Have a look at justanybeer.com - we're getting there

Best from Belgium

Have Fun!
One line at a time ...
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On