Jump to content

Importing large SQL File... possible?


Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/1403-importing-large-sql-file-possible/
Share on other sites

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 :)

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.