PDA

View Full Version : Migrating MySQL Database from Local to Remote Server


atheistrical
08-11-2009, 12:01 PM
I have a MySql database installed on my local computer and have been developing an web-application based on it. I use PHP-MyAdmin to administer the database.

Now, I wish to upload my web application to a remote web-server so that it goes online. The web-server too has PHP-MyAdmin installed. Hence, I exported my database and saved it as database.sql on my desktop. I should now be able to import this database.sql into my remote web server. But, here comes the real hurdle:

The database.sql file has a file size of 200 megaBytes. I simply couldn't get it uploaded to my remote web-server. I have an internet connection with bandwidth upto 512 kbps.

Is there a way to break my file into smaller chunks and rejoin after upload, or any workaround to my issue?? Any help will be greatly appreciated!

abduraooft
08-11-2009, 02:46 PM
How about uploading your database.sql file to your server, and then getting the queries one by one using a PHP script and calling mysql_query() ?

DaiLaughing
08-12-2009, 09:49 AM
200 MB will upload. However you try it will have to be uploaded anyway to get it there even if it is in small chunks.

Fumigator
08-12-2009, 04:58 PM
If I were you, I would split your import into two phases-- structure, and data. I would first export the database structure only-- no data. Import that in your production environment.

Then determine if there are just one or two tables that are huge, and exclude them from the first data move. Get all of the smaller tables done, then work on the larger tables. If necessary, export and import one table's data at a time.