Aller directement à la fin des métadonnées
Aller au début des métadonnées

If, like me, you don't have command line access and can only do this through phpMyAdmin, you'll have to alter the method on the parent page. Here's how I did it.

This method is assuming that you've an old CiviCRM installation and a new, clean, CiviCRM installation, of the same version number, on a different server.

  1. Export the old database in its entirety from the old server.  Let's call this sql file OLD_COMPLETE.sql.
  2. Export the old database without the following five tables.  Let's call this sql file OLD_LESS_FIVE_TABLES.sql.
    1. civicrm_acl_cache
    2. civicrm_acl_contact_cache
    3. civicrm_cache
    4. civicrm_domain
    5. civicrm_group_contact_cache
  3. On the new server, backup the 'clean' database, calling it, say, CLEAN_NEW_INSTALL.sql.
  4. On the new server, export the same five tables mentioned in step 2.  Let's call this sql CLEAN_FIVE_TABLES.sql.
  5. Edit OLD_LESS_FIVE_TABLES.sql with a text editor (e.g. Notepad++ ) and delete all the constraint information at the bottom of the file.
  6. Edit CLEAN_FIVE_TABLES.sql with a text editor and delete all the constraint information at the bottom of the file.
  7. Open CLEAN_NEW_INSTALL.sql with a text editor and copy and paste all the constraint information at the bottom of the file into a new file, CONSTRAINTS.sql, say.
  8. Delete the contents of the database on the new server (select all tables and then 'drop' them as many times is needed until they're gone).
  9. Import OLD_LESS_FIVE_TABLES.sql and CLEAN_FIVE_TABLES.sql into the new database.
  10. Import CONSTRAINTS.sql into the new database.
  11. Now follow the instructions on the parent page from the step on clearing your cache onwards.

This should then work.  Perhaps there's an easier way to do this in myPhpAdmin, but I kept getting foreign key constraints complaints any other way.

Étiquette
  1. Nov 01, 2013

    Bruce Wolfe dit :

    These nice instructions could be further articulated with some colors for the file names as there are many back and forth steps. As follows, my suggestions:

    1. Export the old database in its entirety from the old server.  Let's call this sql file OLD_COMPLETE.sql.
    2. Export the old database without the following five tables.  Let's call this sql file OLD_LESS_FIVE_TABLES.sql.
      1. civicrm_acl_cache
      2. civicrm_acl_contact_cache
      3. civicrm_cache
      4. civicrm_domain
      5. civicrm_group_contact_cache
    3. On the new server, backup the 'clean' database, calling it, say, CLEAN_NEW_INSTALL.sql.
    4. On the new server, export the same five tables mentioned in step 2.  Let's call this sql CLEAN_FIVE_TABLES.sql.
    5. Edit OLD_LESS_FIVE_TABLES.sql with a text editor (e.g. Notepad++ ) and delete all the constraint information at the bottom of the file.
    6. Edit CLEAN_FIVE_TABLES.sql with a text editor and delete all the constraint information at the bottom of the file.
    7. Open CLEAN_NEW_INSTALL.sql with a text editor and copy and paste all the constraint information at the bottom of the file into a new file, CONSTRAINTS.sql, say.
    8. Delete the contents of the database on the new server (select all tables and then 'drop' them as many times is needed until they're gone).
    9. Import OLD_LESS_FIVE_TABLES.sql and CLEAN_FIVE_TABLES.sql into the new database.
    10. Import CONSTRAINTS.sql into the new database.
    11. Now follow the instructions on the parent page from the step on clearing your cache onwards.