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 (Moderator: Dave Greenberg) »
  • DB ERROR in Civi 4.3.7
Pages: [1]

Author Topic: DB ERROR in Civi 4.3.7  (Read 814 times)

t11m

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
DB ERROR in Civi 4.3.7
October 22, 2013, 07:39:46 pm
I am running CiviCRM 4.3.7 along with Drupal 7.  In the last two days I began receiving a DB error anytime that I attempt to update certain portions of the site.  I have traced the issue to two tables being corrupt in the civicrm database by running mysqlcheck.  Here is the output that shows the specific tables that are corrupt.

Code: [Select]
database_civicrm.log_civicrm_dashboard_contact
Warning  : Incorrect string value: '\xB7r    ...' for column 'content' at row 1

database_civicrm.log_civicrm_group
error    : Corrupt

I see that there is a repair tool for older versions of Civi CRM.  Is there anything for the latest build?  I attempted to run a Mysql repair but mysql states that the database engine does not support the repair operation.

I have a backup from 7 days ago, but I do not want to revert to that backup unless there is absolutely no other option. 

Any help is appreciated.  Thanks!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: DB ERROR in Civi 4.3.7
October 22, 2013, 08:08:50 pm

if logging is not crucial to your site, you should be able to truncate the contents of those two table and get going again

if logging is crucial. you might try doing a table dump and try and recover as much data as possible

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

t11m

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: DB ERROR in Civi 4.3.7
October 22, 2013, 08:53:15 pm
Quote
if logging is not crucial to your site, you should be able to truncate the contents of those two table and get going again

What do you mean if logging isn't crucial?  Wouldn't truncating these tables mean that we would lose all the data in them?  Since one of them is the groups table, wouldn't we have to recreate all groups and then update all records that reference those groups?

SQL dump fails with the error:

mysqldump: Got error: 1034: Incorrect key file for table 'log_civicrm_dashboard_contact'; try to repair it when using LOCK TABLES

Hence I can't get a table dump to recover the data.  I have a valid backup from 10/1/2013.  Can I simply drop the table and then import just that table from the backup?

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: DB ERROR in Civi 4.3.7
October 22, 2013, 11:48:49 pm
The group table will be civicrm_group.

The log_civicrm_group table is a log of changes made to your groups.  It includes who made the change and when. 

So you can truncate that table without losing your groups.

Similarly log_civicrm_dashboard_contact  is a log of changes made to the civicrm_dashboard_contact table.

BTW Lobo, if it is bad forum etiquette to butt in on an answer like this please let me know.  It just seemed to me that your time could be better spent answering/clarifying more difficult posts.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: DB ERROR in Civi 4.3.7
October 23, 2013, 08:33:30 am

joanne:

this is excellent forum etiquette. please continue doing so, much appreciated :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

t11m

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.3.10
Re: DB ERROR in Civi 4.3.7
October 24, 2013, 03:02:39 pm
Thanks for explaining that.  I should have realized that.  Guess I was up to late working on it... :/

When I go to truncate those tables using phpmyadmin I get the error: Table 'log_civicrm_group' is marked as crashed and should be repaired

How do I deal with that? I'm going to jump to command line and try to truncate but if that doesn't work, what should I do next?  I was thinking about trying to stop mysql and then run a myisamcheck with the repair flag?  Would that work?

I know that we are probably getting in to Mysql issues here, but any help would be appreciated.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • DB ERROR in Civi 4.3.7

This forum was archived on 2017-11-26.