This documentation relates to CiviCRM version 3.2. It's not maintained anymore.
Current version of documentation.

Moving the database using phpMyAdmin

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

This page refers to outdated version of CiviCRM. Check current version of documentation.

Documentation Search

CiviCRM 3.2 Documentation

Support and Participation

Developer Resources

CiviCRM book!

Make sure to check out Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

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.

  • Aucun

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.