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

    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
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    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!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    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. v139a MySQL problems - moving db files from crashed server to another
    By olgaki in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 24 Feb 2012, 07:39 PM
  2. Restoring selected MYSQl data
    By shelbydog in forum General Questions
    Replies: 3
    Last Post: 13 Mar 2010, 02:32 PM
  3. MYSQL Data question
    By RobWUK in forum General Questions
    Replies: 0
    Last Post: 27 Jan 2008, 07:36 PM
  4. 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
  5. Direct access to MySQL Data
    By zigzak in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 1 Jun 2006, 01:18 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR