CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Issue with MySQL import ...
Pages: [1]

Author Topic: Issue with MySQL import ...  (Read 1425 times)

backdrifting

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 2
Issue with MySQL import ...
April 29, 2008, 11:52:52 am
I am moving one of my CiviCRM databases to another server.  It's moving from MySQL 4.1 to MySQL 5.  I installed a new copy of CiviCRM 1.9 in my Drupal site on the server with MySQL 5.x., and I configured the CiviCRM database. This worked without issue.

Now when I try importing my data from my other CiviCRM site into the _civicrm database, I get the following error:

Error

SQL query:

--
-- Database: `_civicrm`
--
-- --------------------------------------------------------
--
-- Table structure for table `civicrm_acl`
--
DROP TABLE IF EXISTS `civicrm_acl` ;

MySQL said: Documentation
#1217 - Cannot delete or update a parent row: a foreign key constraint fails

Any suggestions on how to make this work?

Should I delete the new database, and just create a blank civicrm database that I then import the existing data into?

Or is this a MySQL issue since I'm moving from 4.1 to 5?


backdrifting

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 2
Re: Issue with MySQL import ...
April 29, 2008, 01:56:02 pm
Ok, here's an update on this.  I deleted the civicrm database on my new server, and then recreated it using the MySQL database utility.  Then I imported the data and this time the data import worked.  However now when I go into my Drupal site I get a long list of the following errors:

# warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/variantc/public_html/redesign/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 126.
# warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/variantc/public_html/redesign/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 126.
# warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/variantc/public_html/redesign/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 126.
# warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/variantc/public_html/redesign/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 126.
# warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/variantc/public_html/redesign/sites/all/modules/civicrm/CRM/Core/BAO/Setting.php on line 126.


Any suggestions on what I should look for to fix this?

backdrifting

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 2
Re: Issue with MySQL import ...
April 29, 2008, 02:05:08 pm
I fixed it.  It's all working perfectly now.  The issue was fixed based on a post by prickeke.  See quoted message below.  I has the same weird character in my config_backend column.  I deleted that and now it's working.



Quote from: prickeke on July 14, 2007, 10:39:05 pm
I had this same error when moving my civicrm (1.7)/drupal(5.1) installation.  I talked with Donald Lobo and he said to do the following:

Somehow edit your civicrm database (phpMyAdmin, ssh, etc.).
Find the civicrm_domain table.
Find the one entry in that table corresponding to the site.
FInd "config_backend" entry in that table.
Set it to NULL or clear it.

Save changes and try again!

Viola!  That worked for me!


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Issue with MySQL import ...

This forum was archived on 2017-11-26.