Results 1 to 10 of 10
  1. #1

    Question move my mysql database to another server...possible??

    Hi there...

    I am new to this....
    Is it possible to move my mysql database to another server?

    thanks for any reply....

  2. #2
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    11,686
    yes, it is possible.
    You will need to:
    -- dump the sql database (using something like phpmyadmin)
    -- import the sql database (using something like phpmyadmin) on the new server
    -- Change the code you're using to point to mysql on the NEW server

    Make sure you've got the old server allowed to access the new server from a database perspective. By default it probably isn't
    WHMCS Guru - WHMCS addons, management, support and more.
    WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
    Always looking for Linux, WHMCS, Support Desk work. PM for details

  3. #3
    Join Date
    Apr 2005
    Location
    Cochin
    Posts
    2,446
    Quote Originally Posted by joshuayork View Post
    Hi there...

    I am new to this....
    Is it possible to move my mysql database to another server?

    thanks for any reply....
    This is rather simple process.

    1. mysqldump databasename > databasename.sql

    2. copy the file databasename.sql to the new server

    3. Once done
    mysql databasename < databasename.sql
    Sam
    Supportlobby.com - Expertise in Windows/Linux server support, IaaS and PaaS Management
    Spiralbean.com - Custom Software Development
    Email: exec @ activelobby.net | Skype: unni_active

  4. #4
    Join Date
    May 2007
    Location
    Chicago
    Posts
    322
    A potentially faster way to move the database, if you have root access to the raw files, is to shut down MySQL and copy the raw files (.MYI, MYD, etc.) over to the new server. This saves you the time of having to reprocess the SQL statements and rebuild indices. Make certain that you've shut down MySQL during the copy though or you risk data corruption.

  5. #5
    Join Date
    Apr 2005
    Location
    Cochin
    Posts
    2,446
    Quote Originally Posted by Panopta View Post
    A potentially faster way to move the database, if you have root access to the raw files, is to shut down MySQL and copy the raw files (.MYI, MYD, etc.) over to the new server. This saves you the time of having to reprocess the SQL statements and rebuild indices. Make certain that you've shut down MySQL during the copy though or you risk data corruption.
    You will still need to recreate the users whichever method you follow
    Sam
    Supportlobby.com - Expertise in Windows/Linux server support, IaaS and PaaS Management
    Spiralbean.com - Custom Software Development
    Email: exec @ activelobby.net | Skype: unni_active

  6. #6
    Quote Originally Posted by Panopta View Post
    A potentially faster way to move the database, if you have root access to the raw files, is to shut down MySQL and copy the raw files (.MYI, MYD, etc.) over to the new server. This saves you the time of having to reprocess the SQL statements and rebuild indices. Make certain that you've shut down MySQL during the copy though or you risk data corruption.
    Be very careful when using this method, if your version of MySQL is significantly different (for example if one server is MySQL 4.1 and the other is MySQL 5).

    You might corrupt your database tables this way.

    I have found over the year that doing a mysqldump as activelobby4u works best. A mysqldump still has the potential for corruption if you are moving mysql versions, but I have seen fewer problems.
    Pierre Grandmaison
    Offering 24/7 Toll Free Telephone Support
    Zenutech Web Hosting
    http://www.zenutech.com

  7. #7
    Join Date
    Sep 2006
    Location
    The Not So Deep South
    Posts
    929
    Quote Originally Posted by Zenutech View Post
    Be very careful when using this method, if your version of MySQL is significantly different (for example if one server is MySQL 4.1 and the other is MySQL 5).

    You might corrupt your database tables this way.

    I have found over the year that doing a mysqldump as activelobby4u works best. A mysqldump still has the potential for corruption if you are moving mysql versions, but I have seen fewer problems.
    mysqldump --compatible=mysql40 dbname > dbname.sql

    While not 100% perfect, has avoided many problems when migrating between versions.
    Hostigation.com - High Resource Hosting
    WHM/cPanel Servers for Hosting and Dedicated Needs
    SolusVM VPS Hosting - Big Features, Small Prices
    Like us on Facebook or follow @hostigation on Twitter

  8. #8
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Dumping and restoring the database will be always a good option.

  9. #9
    If I were you I would dump it and restore it just as activelobby4u said. Good luck!

  10. #10
    Join Date
    Nov 2007
    Location
    NE Ohio
    Posts
    47
    the tricky part will be in changing your connect strings in the app you're working with. if its clean: no problem. if its dirty: i don't think we'll see you posting on here very often until it is resolved... that would be a potentially BIG job!
    [URL="http://www.careermarketplace.com"]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •