Moving Servers / Moving Databases

Discussion in 'MySQL' started by Alexj17, May 3, 2008.

  1. #1
    Hi All

    I currently have two databases on my server, one for my forums (over 400 members, 7000 posts, arcade and all that) and also a database to store reviews and other things. I am making a new website and want to use the forums i have already setup (same posts, members etc). I understand that copying these over will mean they will be two different forums so new members will need to register both and any new posts will only display on that one forum. This is fine i dont mind this.

    How would i go about copying this over, i use a program called SQLyog to monitor my database and i have been told i need to download the sql and upload it again to the new server. This sounds fine for the small review table i have created but for the forums i am unsure.

    How would i install the forums on the new server but link it to the copied database rather than a new database once it installs?

    Cheers for you help,
    Alex James
     
    Alexj17, May 3, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    If possible, you may want to make a single users database that controls user access to both sites. This way your visitors only need to register once. Otherwise, you could have your script add a user to both databases through a single function.

    As far as transferring, I use a program called Navicat (http://www.navicat.com/) for MySQL and PGSQL. It allows you to fully backup and restore databases to any host, and is by far the best GUI for MySQL that I have ever found. They offer a free 30 day trial, if you want to use that method. Otherwise you can use 'mysqldump' (http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html) to backup the database. You can then restore the backup to the new database. Here's a quick guide on how to backup and restore a database: http://www.abbeyworkshop.com/howto/lamp/MySQL_Export_Backup/index.html.
     
    jestep, May 3, 2008 IP
  3. Alexj17

    Alexj17 Member

    Messages:
    173
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #3
    Thanks for you help, i wanted two totally different websites with two different forums (just didnt want my new site to have empty forums so thought i would make it look busy by using the current popular one). Whereas i didnt use the programs you suggested, i was able to "backup" and "restore" the database from old server to new server using 'SQLyog' like you said and that worked fine. I thought i was alot harder than that...

    Thanks alot !!!
    AJ
     
    Alexj17, May 5, 2008 IP