1.

Solve : Transferring MySQL databases?

Answer»

I'm trying to transfer the database of my phpbb from my old web host to my new one. I made a backup of all the files and a backup of the database in a .sql file.

Problem is... I don't know how to get it from one place to the other. I tried a few tutorials but became lost. Anyone know how to explain this in the most dumbed-down way possible for a newbie?The question you need to ask is what mechanisms do your old and new hosts provide for importing/exporting MySQL databases?  If they both provide phpMyAdmin, then it's pretty easy to do a full export and a full import.  Is this offered?  Do they allow you a shell account access (in which case you'd be able to use the command line MySQL tools)?Both have phpMyAdmin. I'm not sure about shell account access.
I've DONE a export from the old host, but I don't know how to import it to the new one.Okay, having phpMyAdmin available MAKES things a lot simpler.  When you export a database to a file, what you actually do is create a list of SQL commands to reconstruct the database.  So in order to "import" the database, you actually have to "run" it.

Note that phpMyAdmin does not seem to recreate the database - just the tables.  So create all the relevant databases (probably just one if you've got all your phpBB tables in one place); then you're ready to run the SQL.

To do that, log into phpMyAdmin on your new host.  Create the database (if you've not already done so) and select it.  Then bring up a query window - in the current VERSION of phpMyAdmin, that involves clicking on the correct icon in the LEFT hand panel.  On my version, it is a little window with SQL written in it.

This will bring up a popup window.  Choose Import Files.  Browse for your .sql file and click go.  You're done.How do I know if it's importing? After I hit Go it just sits there  :-?There isn't a progress bar, I'm afraid.  You just need to wait.  A large database will take quite a while to import.  You can try flipping to the main phpMyAdmin screen, and looking for the new tables.  If the import is working, you should see them.It seems my server times out and logs me out before it's able to transfer (if it's even TRANSFERRING at all). Is there a way I could break it down to smaller files and import part at a time?Absolutely.  Could be a little tedious, but it can be done.  I guess the tables that you're transferring must be fairly large.

On the export page you'll see an option "DUMP [      ] row(s) starting at record # [      ]".  I don't know how large the tables are, but you can use that to split them up into smaller sections.



Discussion

No Comment Found