![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
So Fucking Banned
Join Date: Sep 2003
Location: Somewhere between my monitor and my chair
Posts: 3,214
|
Moving MySQL ?
Got a problem that i am hoping someone may have the answer too.
We want to move one of our MySQL databases from server a to server b. What is the easiest way of doing this? We have already tried to view a data dump but there is so much info in this single DB that it keeps crashing IE. Any easy way around this short of asking our host to do it? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
Step One - Backup current database:
Telnet/SSH into your system (we'll call it machine1) from the root directory, type mysqldump --opt -uUSERNAME -p databasename > /path/to/dump.sql this should only take about than 30 seconds to a few minutes, depending on your database size when it is completed, it will bring you back to the prompt verify that you have a dump.sql in the /path/to area you specified Step Two - Transfer to new server Telnet/SSH into machine1, and from the command prompt type the following: cd /path/to/yourbackupdirectory Then type ftp MACHINE2 Replace MACHINE2 with the host name (eg. www.example.com ) or IP address (eg. 192.168.0.0 ) of your new server. This should open a connection and ask for your username/password, then it should say ftp> Type the following, hitting enter after each line: bin cd /path/to/newdirectory put dump.sql It should take between 20 seconds and a few minutes depending on the size of the file. Now type: close quit verify dump.sql is in the /path/to/new area on the new server. Step Three - Restore to new server Telnet/SSH into machine2 create a database on the mysql if necessary (ask your server admin for help with this as it varies from machine to machine) at the prompt type mysql -uUSERNAME -p newdbname < /path/to/dump.sql this takes a couple of minutes depending on your database size, but you can track the progress either by FTP (checking the /mysql/data/newdbname and see the files appearing) or by phpMyAdmin (you should see the files appearing there) when it is completed, it will bring you back to the prompt
__________________
Amen |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
So Fucking Banned
Join Date: Sep 2003
Location: Somewhere between my monitor and my chair
Posts: 3,214
|
Thank you going to try this now
![]() A quick question though if i may, will this be the same even if machine2 is hosted at a different company to machine 1? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
Yep
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
So Fucking Banned
Join Date: Sep 2003
Location: Somewhere between my monitor and my chair
Posts: 3,214
|
Thanks will lyk how it goes and if it worked
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
So Fucking Banned
Join Date: Aug 2003
Location: San Diego, CA
Posts: 5,464
|
Can't you just move the MYD files?
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
Quote:
![]()
__________________
Amen |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Jan 2002
Location: In the walls of your house.
Posts: 3,985
|
Quote:
__________________
"Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats." --H.L. Mencken |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: May 2003
Posts: 1,025
|
If you have Cpanel you can simply download a backup of the database and restore it on the new box.
Additionally you could SCP the file using the method described above. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Industry Role:
Join Date: Feb 2003
Posts: 7,340
|
Quote:
Then import it on your new box? 0.o |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Confirmed User
Join Date: May 2003
Posts: 1,792
|
Quote:
__________________
ICQ: 282814268 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Join Date: May 2002
Location: CT
Posts: 5,246
|
Quote:
Dont use phpMyadmin, I found that for very big files it messes up sometimes. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |