Philiwily Posted January 10, 2009 Posted January 10, 2009 I'm in the process of transferring servers, and importing my sql database is giving me issues. It's 135mb, 25mb gzipped. When I try to import it in phpmyadmin, I have "Allow interrupt of import in case script detects it is close to time limit. This might be good way to import large files, however it can break transactions" ckecked off. So, it will do a couple of tables, then stop. Then I have to start it again. If I uncheck it, Firefox just times out after a little bit and I have to start from the beginning. Is there any easier way to do this? I've transferred servers before and I've never had this problem.
LeetScape Posted January 10, 2009 Posted January 10, 2009 Usually you can re-send the same file and it will continue from where it previously stopped, are you sure you're not already doing that?
Philiwily Posted January 10, 2009 Posted January 10, 2009 Usually you can re-send the same file and it will continue from where it previously stopped, are you sure you're not already doing that? I'm doing that, but it's taking forever. The first time I did it, it imported 57 tables. The second time it imported 3 tables. There are 135 tables total. I'm going on round three, but it's taking a while.
RobertMidd Posted January 10, 2009 Posted January 10, 2009 If the file has SQL commands and you have root access to the server and MySQL via SSH then you can do this using the mysql prompt and it will take no time at all to import. I have imported a database of similar size in a matter of minutes. Steps areCreate the destination database in MySQL Put the sql import file into a convenient location on the server login to MySQL on the sever and select the database (USE <dbname>) at the mysql prompt enter the command SOURCE followed by sqlfilename (eg; SOURCE /var/mysqldump.sql) See http://dev.mysql.com/doc/refman/5.0/en/batch-commands.html
AndyF Posted January 10, 2009 Posted January 10, 2009 If you don't have shell access to the "new" server, connect via FTP to it. Above public_html (so it is not web visible!) , create a temporary directory (call it "to_import" or something) Upload your database backup into this directory. Now contact your host and ask them to import it for you (telling them where you have put it) When its imported and you are happy it's ok, remove the temporary directory you made. Make sure you create the directory above public_html / www though, as you do not want it to be accessible via the web. :)
Philiwily Posted January 10, 2009 Posted January 10, 2009 I do have SSH access... and I tried importing the database using this tutorial (ya... I'm new to the whole SSH deal), but it only imported 60 tables. That's similar to what happened last time too... Edit: Nevermind, I got it imported successfully. Thanks for your help guys. Edit 2: Actually, is there anyway I can update a database with a newer database, without deleting all the stuff that's on there? If that was confusing at all I'll try to make it simpler: I'm transferring servers. One is live and one is not. Before switching over domains, I've been transferring stuff from the live one to the one that is going to be my new server. I already transferred the database, but it is going to be dated when I finally switch the domains to make it live. All I want to do is update the database with the new posts and such. I tried doing this by exporting my database from the live server with the "Update" mode on. Then I imported it to my not-live server. It partially worked, but it timed-out again. :(
rct2·com Posted March 9, 2009 Posted March 9, 2009 I already transferred the database, but it is going to be dated when I finally switch the domains to make it live. All I want to do is update the database with the new posts and such. We've always just done a couple of rehearsals like you are doing now, making detailed notes of all the steps so we can be sure what we need. Then we've sTEP 1 STOPS ANYBODY WRITING ANYTHING TO THE DATABASE during transfer, SO NOTHING GETS LOST. oops caps lock :( [*]Closed the old forums with a board offline messgae. It says something like "We're moving, the next time you see this board online, you'll have reached us on our new server" [*]Backup the old and import onto the new, using the detailed notes. [*]Make the DNS changes to point the domain at the new server [*]Bring the new board online and post a 'Welcome' topic! :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.