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 »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Error
Pages: [1]

Author Topic: Error  (Read 1682 times)

godztek

  • Guest
Error
January 13, 2009, 08:53:09 am
My first attempt to install civicrm timed out but before it did, reated all the tables in mysql...i really need to get it installed, however when i uninstall the component from joomla it can't erase the tables and if i try to manually erase the tables i get the error below...

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

it wont let me install civicrm until all the tables are gone...i guess because it cant overwrite the tables because of the same error.

thanks in advance for the help.

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Error
January 13, 2009, 09:01:41 am
Keep going through and deleting the tables in mysql. Because of key-dependencies, you'll have to run through the list of tables several times before they are all removed. Or if you can disable keys on delete, they should all go at once.

Basically the key relationships requires they be removed in a certain order so as not to violate the relationship rules.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

godztek

  • Guest
Re: Error
January 13, 2009, 09:11:24 am
Every individual table gives the same error...i am using phpmyadmin if that helps anything...i just went through each individual table and tried to delete them individually and still got the same error on every one of them.

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Error
January 13, 2009, 09:16:34 am
But you'll notice that each time you go through, a few of the tables are removed.
For example, the domain, worldregion, and contact tables are the very last ones to be deleted, because they're the highest level (most tables have FK's to those tables).
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

godztek

  • Guest
Re: Error
January 13, 2009, 09:18:50 am
its actually not dropping anything...

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Error
January 13, 2009, 09:57:46 am
In PMA, go to the SQL tab and enter the following:

Code: [Select]
SET FOREIGN_KEY_CHECKS=0;
DELIMITER $$
DROP PROCEDURE IF EXISTS drop_tables_like$$
CREATE PROCEDURE drop_tables_like(pattern varchar(255), db varchar(255))
BEGIN
  SELECT @str_sql:=concat('drop table ', group_concat(table_name))
  FROM information_schema.tables
  WHERE table_schema=db and table_name like pattern;
  PREPARE stmt from @str_sql;
  EXECUTE stmt;
END$$
DELIMITER ;
CALL drop_tables_like('civicrm_%', 'j15');

Replace "j15" with whatever your table name is. This should drop all CiviCRM tables. I recommend making a backup of the database before you run this.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

tajacobson

  • Guest
Re: Error
January 23, 2009, 12:48:11 pm
Here's what worked for me, delete the Joomla install directory and reinstall it.  Then run CiviCRM install again.

If you don't have any important data or if you have a back up this is the quick and easy way.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Error

This forum was archived on 2017-11-26.