View Full Version : Transferring mysql database
01-25-2002, 05:17 AM
Can someone tell me how to transfer a mysql database from one host to another?
I have phpmyadmin installed on both; if that's any help to me? I tried doing a database dump or something or other like I read on some site... but it wont work.
So if someone could give me some sort of step by step instruction on getting it off the one host, and putting it on the other :)
01-25-2002, 10:29 AM
Well we need the answers to a couple of questions first. Do your hosts allow you to SSH Telnet into your server, and are you currently using a control panel on your server, if so which one. The answers to these will help us help you :)
01-25-2002, 01:42 PM
Yes, I need to know this as well.
I can Telnet because I have a dedicated server, but I also have Ensim control panel installed.
01-25-2002, 02:49 PM
Use the following as a source of directions for the moving, transfering of your database.
Download a program called putty from here http://www.hostrocket.com/putty.exe
This is what I did, and it works perfectly.
1) Put in your ip address for your old host where it asks for your hostname. Then select the SSH radio button, and click on open. It will prompt you for your login name to that server. Type in your login name and press enter, then it will prompt you for you password, type it in and press enter, and then do the following. (note) You will not see your password being typed in
2) Then I would do a dump of your database
mysqldump -uusername -ppassword databasename > file.sql
3) Now download the file.sql to your hard drive.
4) Use your FTP client to upload the file.sql to your new server in ASCII mode only!
5) Open a new session in putty by rightclicking the top bar.
6) Enter your NEW HOSTS ip address and select the SSH radio button then open.
7) Now you must restore the database
mysql -uusername -ppassword databasename < file.sql
8) Have Fun!!
So if my
database name is forums
username is steven
password is test
then Here is what to do.
mysqldump -usteven -ptest forums > forums.sql
Then upload the forums.sql to your new server in ASCII mode ONLY. Open a new session in Putty with your NEW HOSTS IP Address, click on the SSH radio button and then open. Put your Login name and password to your new hosts server. Then when you get prompted by a $ sign type
mysql -usteven -ptest forums < forums.sql
Let me know how it goes.
Hope this helps.
01-25-2002, 11:46 PM
Can't remember who's site this is, but it is someone on this board. It is VERY helpful:
That looks a bit like GG Singloon's site ;)
vBulletin® v3.7.4, Copyright ©2000-2014, Jelsoft Enterprises Ltd.