Web Hosting Talk







View Full Version : Move a MySQL Database from one host to another using phpMyAdmin


BF-Gary
01-17-2004, 03:05 AM
The following are the steps to Export and then Import a MySQL database usnig phpMyAdmin

Export from phpMyAdmin

[list=1]
Open cPanel and open your phpMyAdmin
On the welcome screen you will see an Export option click on this link
This will bring up the view dump (schema) of databases screen
Select the tables you wish to be exported from the list
Ensure you choose SQL as the option (this will alow you to just paste the SQL for your next host)
It will create text file on the screen, highlight the information and paste it into a text document. Save this for when you get hosting. [/list=1]

Import to phpMyAdmin[list=1]
Open cPanel and open your phpMyAdmin
On the welcome screen you will see an Query window option (lower left corner) click on this link
Paste the contents of the text file that you exported and done. Your database and it's contents are moved.[/list=1]

DT-Spirit
01-17-2004, 03:43 AM
Thanks...
Finally know how to do this..

The Weasel
01-17-2004, 03:45 AM
Thank you, monster123 for this how-to. I think this will be the easiest way for me to explain it to my clients when they move over to us.

kikonoro
01-17-2004, 06:38 AM
thank you very mich for this. I have had trouble with this for a while now and you make it osund so easy. Thnx.

Akash
01-17-2004, 04:23 PM
Thanks monster123, your How-To has been approved!

It will go in the Programming How-To Forum when I create it.

Aea
01-17-2004, 04:51 PM
I have found this to be very ineffective and time consuming for databases over 10 MB.

Akash
01-17-2004, 05:17 PM
Perhaps you could write a how-to to do this via SSH ;)

XYPHEN
01-17-2004, 09:44 PM
Thank you for sharing this with us, are we allowed to use these How-To's ? If I provide a link saying How-To thanks to Name(URL).

aqi32
01-19-2004, 03:06 PM
when you backup a database through cpanel does it backup the whole database like through phpmyadmin (table structure and data) or is it just the data?

cheers :)

Tom|420
04-07-2004, 06:00 PM
Even better is to save the the data to a file, and transfer the file directly to the new host (using the file input form just below the query form). That way the client has a backup, and he has no more excuse not to have a backup when something gets screwed up.

cpbb
07-04-2004, 11:40 AM
phpMyAdmin has a size limit of 2 megs I think, it caught us out when moving a DB, in which case you need to do it via shell.

linux-tech
07-04-2004, 01:54 PM
yeah, and there's a howto on that one as well already :)

cpbb
07-04-2004, 02:05 PM
Yeah I looked at that, if you have a DB with large data in a field then you can come across problems with the import, sometimes you have to split the import or adjust MySQL accordingly with a command line switch..

BTW you can export any size data from phpMyadmin as far as I can tell, its just the import size thats restricted.

Tom|420
07-04-2004, 09:19 PM
Of course there are two limits at importing data into phpMyAdmin:

1) PHP file upload size limit, when uploading the file (default is 2 MB I think)
2) Post size limit, as set into both the browser and the server (this one is probably a few mega-bytes, not much more -- there are colored discussions everwhere about what exactly is the limit here)

cbhq
07-12-2004, 09:22 PM
Any ideas how one could move larger dbs when you dont have external access to the database?

oldnewbie
09-03-2004, 12:29 PM
Hello guys,

I know it could be little bit boring but I need to ask anyway.
I got to the cpanel on my commerce account.

I`m trying to import my database of 5mb.
Now I don`t know If I should receive any message
after uploading the sql database? or something like that?

1st question. How do I know that database is already
uploaded.

2nd I got phpbb installed (messageboard) on my account.
Now should I do anything else to see my database
on forum ?

I`d be grateful for any response.
Cheers

Oldnewbie

linux-tech
09-03-2004, 12:39 PM
5m might be a bit of a problem for sql uploads in phpmyadmin, though I could be wrong. I'd advise doing that the ssh way.

oldnewbie
09-03-2004, 12:43 PM
Did you have any problems by uploading huge databases like this ever before?

I`m not experienced enough to discuss about it.
Anyway I`ll try to ask my administrator for clarification on this
issue but he`s unavailable at the moment.

Thanks for your reply..
Is there any minimum for database upload via CPANEL?
I mean this is www way.. any recommendation
for highest upload...

linux-tech
07-13-2005, 09:35 PM
Originally posted by oldnewbie
Did you have any problems by uploading huge databases like this ever before?
You won't be able to do this unless you've updated the php upload limit. If you've got a large database, use the ssh method, or have your host do it for you if they won't allow you to.
Originally posted by oldnewbie

Is there any minimum for database upload via CPANEL?

No MINIMUM, but if the database is large enough, it is entirely possible that you'll time yourself out while uploading. Doing this through phpmyadmin will cause problems if the database is above the php max_upload limit.

Usually when I move things around, I find it 10x easier just to dump the databases, then import them into the new serverthrough ssh. No messy uploads, no timing out, no silly stuff.

eranga
07-28-2005, 07:32 AM
Make sure to select the correct mysql version from the phpMyadmin's drop down list before exporting. Otherwise somm issues may occur due to version incompatibilities.