Jump to content


Photo

Importing large SQL File... possible?


  • Please log in to reply
2 replies to this topic

#1 jvanv8

jvanv8
  • New Members
  • Pip
  • Newbie
  • 1 posts
  • LocationMaine

Posted 20 November 2003 - 07:16 PM

I have a mysql database that I have been working with on my local machine and now I want to export it to my live website.

I dumped the content and structure of the database into a sql file - about 56mb

I then logged onto my live phpmyadmin and tried to execute sql from the file on my local machine but it doesn\'t seem to be working. Netscape didn\'t load it and Safari seems to be hung saying (completed 2 of 3 items)

What is the best way to do this? Hopefully it won\'t be a big deal especially since I anticipate the database sql file to be more than 800mb in the future.

Thanks for any help
- John

#2 triphis

triphis
  • Members
  • PipPipPip
  • Advanced Member
  • 62 posts

Posted 20 November 2003 - 09:23 PM

All I could suggest is break up the DUMP. I\'m sure your\'s has individual insert statements? Just break that up into manageable sets...

When I view dumb, it gives me something like this:

#
# Table structure for table `r99`
#

CREATE TABLE r99 (
 id int(4) NOT NULL auto_increment,
 name varchar(50) NOT NULL default \'\',
 status int(1) NOT NULL default \'0\',
 PRIMARY KEY  (id),
 UNIQUE KEY name (name)
) TYPE=MyISAM;

#
# Dumping data for table `r99`
#

INSERT INTO r99 (id, name, status) VALUES (1,\'A Chia Halloween n\',\'\');
INSERT INTO r99 (id, name, status) VALUES (2,\'A Chia Story n\',\'\');


So just grab a couple hundred inserts at a time or whatever :)
Xac Attack

#3 dzogchen

dzogchen
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 21 November 2003 - 10:28 PM

Since you use Safari I assume you\'re running a Mac. My experience with this is on a Linux box. You might be able to do this with OSX if you aren\'t afraid of the command line...... and you have the software tools - I think openssh is available but don\'t know for sure. Call me paranoid but I try to do all my remote admin stuff through a secure connection

sftp the dump to the web box, then ssh in to the web box and run mysql from the command line. Chances are it will be much more robust than running everything through phpmyadmin.

I recently moved a relatively large database (500+ meg) this way, with no problems.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users