| Welcome to WebmasterWorld Guest from 184.108.40.206 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|Moving a MySQL database to a different server|
How can I move my database from one server to another one?
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.
1.) service mysql stop
2.) rsync -e ssh -avz /var/lib/mysql/database_name/ firstname.lastname@example.org:/var/lib/mysql/database_name/
3.) server mysql start
==> your DB will be ready on the new server with IP=server.ip
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.
then just copy the db directory via FTP
Not sure why it isn't working, are you getting any error messages? I presume you are exporting via phpmyadmin?
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.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved