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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-07-2006, 02:56 PM   #1
Mr Pheer
Top Rated CEO
 
Mr Pheer's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Las Vegas
Posts: 21,862
How do you move MySQL database to different server?

I'm moving my biker forum to a new server, and dont know how to backup the current database, move it, and set it up on the new machine so i dont lose any of the users or posts on the board.

Can anyone give me a quick step by step to do this?
__________________
Mr Pheer is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2006, 02:59 PM   #2
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
server1>mysqldump --user=root --pass=pass --opt database > db.backup.sql
server1>sftp db.backup.sql server2.com

create the empty database on server 2

server2>mysql -u root -ppass database < db.backup.sql


i'm sure there's easier ways, but that's one of them in a nutshell
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2006, 03:02 PM   #3
Mr Pheer
Top Rated CEO
 
Mr Pheer's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Las Vegas
Posts: 21,862
thanks man!
__________________
Mr Pheer is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2006, 04:52 PM   #4
Mr Pheer
Top Rated CEO
 
Mr Pheer's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Las Vegas
Posts: 21,862
ok the importing does not work

anyone else know how to import the database on FreeBSD?
__________________
Mr Pheer is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2006, 04:56 PM   #5
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
That should be pretty flawless. Do you get an error ? Does it just not create the tables ? Is the mysql version different ? You may need a compatibility switch.
__________________
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2006, 05:04 PM   #6
Mr Pheer
Top Rated CEO
 
Mr Pheer's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Las Vegas
Posts: 21,862
actually this works:
mysql -u admin -ppassword -D dbase < db.dbase.sql
__________________
Mr Pheer is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2006, 05:30 PM   #7
X37375787
Guest
 
Posts: n/a
check the vBulletin documentation, it's described in detail how to move it.

P.S. I suggest you redirect the old server's traffic to the new IP immediately, before the DNS resolves to the new server.
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2006, 05:34 PM   #8
uno
RIP Dodger. BEST.CAT.EVER
 
uno's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: NYC Area
Posts: 18,450
Use phpMyAdmin to dump the db to an sql file, then import it on the new server.

http://sourceforge.net/projects/phpmyadmin/

Easy as pie.
__________________
-uno
icq: 111-914
CrazyBabe.com - porn art
MojoHost - For all your hosting needs, present and future. Tell them I sent ya!
uno is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2006, 05:34 PM   #9
xroach
Confirmed User
 
Join Date: Feb 2002
Location: vancouver, bc
Posts: 963
(approx)

cd /var/db/mysql/$dbname
tar cf $dbname.tar $dbname
scp $dbname.tar root@$targethost:/$targdir
ssh -l root $targethost
cd /var/db/mysql
tar xzvf <targdir>/<dbname>.tar
chown -R mysql:mysql <dbname>
xroach is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-07-2006, 05:35 PM   #10
uno
RIP Dodger. BEST.CAT.EVER
 
uno's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: NYC Area
Posts: 18,450
If you need help drop me an icq.
__________________
-uno
icq: 111-914
CrazyBabe.com - porn art
MojoHost - For all your hosting needs, present and future. Tell them I sent ya!
uno is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.