|
|
|
||||
|
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 |
|
Top Rated CEO
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?
__________________
![]() ![]()
|
|
|
|
|
|
#2 |
|
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. |
|
|
|
|
|
#3 |
|
Top Rated CEO
Industry Role:
Join Date: Dec 2002
Location: Las Vegas
Posts: 21,862
|
thanks man!
__________________
![]() ![]()
|
|
|
|
|
|
#4 |
|
Top Rated CEO
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?
__________________
![]() ![]()
|
|
|
|
|
|
#5 |
|
Beer Money Baron
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.
__________________
|
|
|
|
|
|
#6 |
|
Top Rated CEO
Industry Role:
Join Date: Dec 2002
Location: Las Vegas
Posts: 21,862
|
actually this works:
mysql -u admin -ppassword -D dbase < db.dbase.sql
__________________
![]() ![]()
|
|
|
|
|
|
#7 |
|
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. |
|
|
|
#8 |
|
RIP Dodger. BEST.CAT.EVER
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! |
|
|
|
|
|
#9 |
|
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> |
|
|
|
|
|
#10 |
|
RIP Dodger. BEST.CAT.EVER
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! |
|
|
|