Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    1,037
    Plugin Contributions
    24

    Default Moving mysql\data files physically

    Hi,
    I'm just moving my development shop from one xampp installation to another, although its only the database that has to move.

    Is there any reason why one can't just copy the zen folder from
    mysql\data
    to the new mysql\data folder or is it safer to import/export everything as usual with phpMyadmin?

    I have copied it and it seems ok.

    thanks
    Steve

  2. #2
    Join Date
    Jan 2004
    Posts
    58,288
    Blog Entries
    3
    Plugin Contributions
    106

    Default Re: Moving mysql\data files physically

    It's always better to export/import if you're uncertain, or if you're working on a live server.

    That said, on your TEST server if the software for your MySQL version and its configuration on BOTH computers is IDENTICAL, doing a direct copy will likely not pose any problems.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Aug 2004
    Posts
    10
    Plugin Contributions
    0

    Default Re: Moving mysql\data files physically

    there are MySQL catalog tables which hold information about all of your schemas and tables. Look at schema "information_schema" and schema "mysql". These both contain tables with information about other scemas, tables and priviledges.

    So if you just copy data folder for one particular schema, the mysql catalogue tables will not reflect the true state of your mysql installation.

    I.E. DON'T just copy folder to new installation. Export schema and all tables and then import into new setup or you may experience problems when or if trying to do administration on your zencart tables.

  4. #4
    Join Date
    Aug 2004
    Posts
    10
    Plugin Contributions
    0

    Default Re: Moving mysql\data files physically

    You can copy all folders under the mysql data folder including the mysql folder. I.E. All folders or nothing.

  5. #5
    Join Date
    Jan 2004
    Posts
    58,288
    Blog Entries
    3
    Plugin Contributions
    106

    Default Re: Moving mysql\data files physically

    But, keep in mind that if you copy *all* the MySql catalog tables such as "information_schema" etc, then you're also effectively wiping out whatever was in those tables on the new server.
    So, if the privileges are important, either copy everything, making a complete mirror and losing everything from the new server, or manually recreate the privilege details on the new one.

    Best is just to export/import IMO. Gives you most control that way.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Aug 2004
    Posts
    10
    Plugin Contributions
    0

    Default Re: Moving mysql\data files physically

    Quote Originally Posted by DrByte View Post

    Best is just to export/import IMO. Gives you most control that way.
    I agree. Also doing export / import will rebuild all indexes so effectively it will do a partial optimisation as well, which, if it hasn't been done for a while, can be a good thing for efficiency/performance.

 

 

Similar Threads

  1. Moving the Data to the new DB
    By Ianselby in forum Upgrading from 1.3.x to 1.3.9
    Replies: 4
    Last Post: 24 Apr 2009, 01:21 AM
  2. MYSQL Data question
    By RobWUK in forum General Questions
    Replies: 0
    Last Post: 27 Jan 2008, 07:36 PM
  3. Can't access my data MySql data base
    By Roon in forum Installing on a Linux/Unix Server
    Replies: 23
    Last Post: 6 Sep 2007, 03:26 PM
  4. just moving data?
    By skunkworx in forum Upgrading from 1.2 to 1.3.x
    Replies: 3
    Last Post: 29 May 2006, 11:16 AM
  5. Exporting user data from 1.2x to 1.3.0.1 Mysql db
    By kiraninfotech in forum Upgrading from 1.2 to 1.3.x
    Replies: 1
    Last Post: 16 May 2006, 09:22 PM

Bookmarks

Posting Permissions

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