homepage Welcome to WebmasterWorld Guest from 54.205.236.46
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
Moving a MySQL database to a different server
How can I move my database from one server to another one?
Mike_George




msg:3089665
 6:36 am on Sep 20, 2006 (gmt 0)

Hello

I'm moving a site from one server to another one, and I can't work out how to move the MySQL database.

I thought I would be able to use phpMyAdmin to back it up from the server A and then restore it to server B but that doesn't work.

Any help or advice would be much appreciated.

 

freeflight2




msg:3089669
 6:44 am on Sep 20, 2006 (gmt 0)

1.) service mysql stop
2.) rsync -e ssh -avz /var/lib/mysql/database_name/ user@server.ip:/var/lib/mysql/database_name/
3.) server mysql start

==> your DB will be ready on the new server with IP=server.ip

Mike_George




msg:3089688
 7:17 am on Sep 20, 2006 (gmt 0)

Thanks freeflight2, but I don't think I have the access needed to do it that way.

Both sites are on shared hosting so I think I'm limited to what I can do with phpMyAdmin and/or FTP.

freeflight2




msg:3089713
 7:42 am on Sep 20, 2006 (gmt 0)

then just copy the db directory via FTP

maccas




msg:3089726
 8:04 am on Sep 20, 2006 (gmt 0)

Not sure why it isn't working, are you getting any error messages? I presume you are exporting via phpmyadmin?

Mike_George




msg:3092948
 2:01 pm on Sep 22, 2006 (gmt 0)

I'm sorry but I've just been through the process again so I can describe what's happening and it worked, even though I tried it twice before and it didn't.

This is what I'm doing:

1. On xyz.com I use phpMyAdmin to export the database xyz_xyz as a gzip compressed file to my PC drive.

2. On abc.co.uk I create an empty database abc_abc and use phpMyAdmin to import the compressed file.

Anyway it's all working now so I'm sorry for the false alarm but thanks for all your help.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved