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) »
  • [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed
Pages: [1]

Author Topic: [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed  (Read 2954 times)

mudmin

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 1
  • CiviCRM version: 4.2.0
  • CMS version: Joomla 2.5.6
  • MySQL version: 5
  • PHP version: not sure
[Solved] Uninstallation HELL - Uninstall database db mysql problem fixed
August 30, 2012, 11:15:54 am
I just wanted to let people know about the hell I went through completely uninstalling this component. I had an error (which I still haven't fixed), but I wanted to try to uninstall/reinstall first to see if that would fix it. Oh. My. Gosh. 

Once I uninstalled, I reinstalled, but it would not for the life of me connect to the database again. The first installation added about 100 tables to my database that could not be deleted because of Foreign Key Constraints. That's enough to make you pull your hair out.

Soooo...I finally exported my db from phpmyadmin deselecting all the civicrm tables in the db.  Then I created a NEW db with the SAME username and imported that sql dump back in.  Finally I changed the db name in joomla and was able to properly reinstall.

Hopefully will save someone else 5 hours of headaches.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed
August 30, 2012, 12:26:58 pm
In phpMyAdmin, when you attempt to drop multiple tables, it should show you a screen saying "Do you really want to:" and then it shows the full drop code like:

Code: [Select]
DROP TABLE `civicrm_acl`, `civicrm_acl_cache`, `civicrm_acl_entity_role`, ...
If you copy and paste that code (the code in phpMyAdmin, not the code above) and click on the SQL tab and then add a line before and after like this:

Code: [Select]
SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE `civicrm_acl`, `civicrm_acl_cache`, `civicrm_acl_entity_role`, ...
SET FOREIGN_KEY_CHECKS = 1;

It will actually run without error and drop all tables. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

mudmin

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 1
  • CiviCRM version: 4.2.0
  • CMS version: Joomla 2.5.6
  • MySQL version: 5
  • PHP version: not sure
Re: [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed
September 04, 2012, 08:18:27 am
I tried that and it refused for some reason. hmmm

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed
September 04, 2012, 08:19:50 am
Would have to know the MySQL version and the precise error message.

Sounds like it may no longer be relevant however, as I think your site is now OK.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

mudmin

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 1
  • CiviCRM version: 4.2.0
  • CMS version: Joomla 2.5.6
  • MySQL version: 5
  • PHP version: not sure
Re: [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed
September 04, 2012, 09:30:24 am
Actually now I have a totally different screw up. This is some finicky software.  I installed it before my domain was pointed to the site and now that I pointed the domain, I'm getting all sorts of 404 errors. Grr.

mudmin

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 1
  • CiviCRM version: 4.2.0
  • CMS version: Joomla 2.5.6
  • MySQL version: 5
  • PHP version: not sure
Re: [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed
September 04, 2012, 09:32:48 am
I could use a little better instructions on that drop table thing since I'm back in uninstallation hell.  My akeeba deleted my backups after the third one. 

mudmin

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 1
  • CiviCRM version: 4.2.0
  • CMS version: Joomla 2.5.6
  • MySQL version: 5
  • PHP version: not sure
Re: [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed
September 04, 2012, 09:39:30 am
I think I'm understanding you saying to do this....

SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE `civicrm_acl`, `civicrm_acl_cache`, `civicrm_acl_contact_cache`, `civicrm_acl_entity_role`, `civicrm_action_log`, `civicrm_action_mapping`, `civicrm_action_schedule`, `civicrm_activity`, `civicrm_activity_assignment`, `civicrm_activity_target`, `civicrm_address`, `civicrm_address_format`, `civicrm_batch`, `civicrm_cache`, `civicrm_campaign`, `civicrm_campaign_group`, `civicrm_case`, `civicrm_case_activity`, `civicrm_case_contact`, `civicrm_component`, `civicrm_contact`, `civicrm_contact_type`, `civicrm_contribution`, `civicrm_contribution_page`, `civicrm_contribution_product`, `civicrm_contribution_recur`, `civicrm_contribution_soft`, `civicrm_contribution_type`, `civicrm_contribution_widget`, `civicrm_country`, `civicrm_county`, `civicrm_currency`, `civicrm_custom_field`, `civicrm_custom_group`, `civicrm_dashboard`, `civicrm_dashboard_contact`, `civicrm_dedupe_exception`, `civicrm_dedupe_rule`, `civicrm_dedupe_rule_group`, `civicrm_discount`, `civicrm_domain`, `civicrm_email`, `civicrm_entity_batch`, `civicrm_entity_file`, `civicrm_entity_financial_trxn`, `civicrm_entity_tag`, `civicrm_event`, `civicrm_events_in_carts`, `civicrm_event_carts`, `civicrm_extension`, `civicrm_file`, `civicrm_financial_account`, `civicrm_financial_trxn`, `civicrm_grant`, `civicrm_group`, `civicrm_group_contact`, `civicrm_group_contact_cache`, `civicrm_group_nesting`, `civicrm_group_organization`, `civicrm_im`, `civicrm_job`, `civicrm_job_log`, `civicrm_line_item`, `civicrm_location_type`, `civicrm_loc_block`, `civicrm_log`, `civicrm_mailing`, `civicrm_mailing_bounce_pattern`, `civicrm_mailing_bounce_type`, `civicrm_mailing_component`, `civicrm_mailing_event_bounce`, `civicrm_mailing_event_confirm`, `civicrm_mailing_event_delivered`, `civicrm_mailing_event_forward`, `civicrm_mailing_event_opened`, `civicrm_mailing_event_queue`, `civicrm_mailing_event_reply`, `civicrm_mailing_event_subscribe`, `civicrm_mailing_event_trackable_url_open`, `civicrm_mailing_event_unsubscribe`, `civicrm_mailing_group`, `civicrm_mailing_job`, `civicrm_mailing_recipients`, `civicrm_mailing_spool`, `civicrm_mailing_trackable_url`, `civicrm_mail_settings`, `civicrm_managed`, `civicrm_mapping`, `civicrm_mapping_field`, `civicrm_membership`, `civicrm_membership_block`, `civicrm_membership_log`, `civicrm_membership_payment`, `civicrm_membership_status`, `civicrm_membership_type`, `civicrm_menu`, `civicrm_msg_template`, `civicrm_navigation`, `civicrm_note`, `civicrm_openid`, `civicrm_option_group`, `civicrm_option_value`, `civicrm_participant`, `civicrm_participant_payment`, `civicrm_participant_status_type`, `civicrm_payment_processor`, `civicrm_payment_processor_type`, `civicrm_pcp`, `civicrm_pcp_block`, `civicrm_persistent`, `civicrm_phone`, `civicrm_pledge`, `civicrm_pledge_block`, `civicrm_pledge_payment`, `civicrm_preferences_date`, `civicrm_premiums`, `civicrm_premiums_product`, `civicrm_prevnext_cache`, `civicrm_price_field`, `civicrm_price_field_value`, `civicrm_price_set`, `civicrm_price_set_entity`, `civicrm_product`, `civicrm_project`, `civicrm_queue_item`, `civicrm_relationship`, `civicrm_relationship_type`, `civicrm_report_instance`, `civicrm_saved_search`, `civicrm_setting`, `civicrm_sms_provider`, `civicrm_state_province`, `civicrm_subscription_history`, `civicrm_survey`, `civicrm_tag`, `civicrm_task`, `civicrm_task_status`, `civicrm_tell_friend`, `civicrm_timezone`, `civicrm_uf_field`, `civicrm_uf_group`, `civicrm_uf_join`, `civicrm_uf_match`, `civicrm_website`, `civicrm_worldregion`;
SET FOREIGN_KEY_CHECKS = 1;

This is the response I get...
SQL query:

DROP TABLE `civicrm_acl`, `civicrm_acl_cache`, `civicrm_acl_contact_cache`, `civicrm_acl_entity_role`, `civicrm_action_log`, `civicrm_action_mapping`, `civicrm_action_schedule`, `civicrm_activity`, `civicrm_activity_assignment`, `civicrm_activity_target`, `civicrm_address`, `civicrm_address_format`, `civicrm_batch`, `civicrm_cache`, `civicrm_campaign`, `civicrm_campaign_group`, `civicrm_case`, `civicrm_case_activity`, `civicrm_case_contact`, `civicrm_component`, `civicrm_contact`, `civicrm_contact_type`, `civicrm_contribution`, `civicrm_contribution_page`, `civicrm_contribution_product`, `civicrm_contribution_recur`, `civicrm_contribution_soft`, `civicrm_contribution_type`, `civicrm_contribution_widget`, `civicrm_country`, `civicrm_county`, `civicrm_currency`, `civicrm_custom_field`, `civicrm_custom_group`, `civicrm_dashboard`, `civicrm_dashboard_contact`, `civicrm_dedupe_exception`, `civicrm_dedupe_rule`, `civicrm_dedupe_rule_group`, `civicrm_discount`, `civicrm_domain`, `civicrm_ema[...]

MySQL said: Documentation
#1051 - Unknown table 'civicrm_acl_cache,civicrm_acl_contact_cache,civicrm_acl_entity_role,civicrm_action_log,civicrm_actio'

Not to be a complainer, but I think there should be an option to delete the tables when you uninstall the software. It shouldn't even require going into phpmyadmin to do it. 

Soooo, I'm still stuck with another bum installation until I can get these tables deleted

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed
September 04, 2012, 09:49:55 am
Your SQL is very close. What you need to do (presuming your CiviCRM DB is the same as Drupal or Joomla) is manually select all tables starting with civicrm_ and then choose Drop. Then on the next page you will get the DROP ... code. Then proceed to add the line before and after about foreign key checks.

If your CiviCRM DB is not the same as your CMS, then you can just delete the entire DB and recreate it.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

mudmin

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 1
  • CiviCRM version: 4.2.0
  • CMS version: Joomla 2.5.6
  • MySQL version: 5
  • PHP version: not sure
Re: [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed
September 04, 2012, 10:13:40 am
That's what I did. Believe it or not, it threw up the error, but deleted the tables. Weird.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • [Solved] Uninstallation HELL - Uninstall database db mysql problem fixed

This forum was archived on 2017-11-26.