Hot answers tagged

13 votes
Accepted

MyISAM database but all civicrm_ tables are INNODB... is this a problem?

I backed the database up, opened it up in Sequel Pro and went to the civicrm_system_log table. Under "Table Info" I could select "InnoDB" from the dropdown. Then I cleared the caches on the CiviCRM ...
Laryn's user avatar
  • 8,253
8 votes
Accepted

Error during Drupal installation: MySQL support not included in PHP

Recommend setting MAMP to use PHP5.6 if you have that option. The screenshots show MAMP is set to use PHP7, but CiviCRM isn't ready for PHP7 yet. (PHP7 removes ext/mysql in favour of ext/mysqli and ...
Chris Burgess's user avatar
7 votes

MyISAM database but all civicrm_ tables are INNODB... is this a problem?

Sounds good. To be sure, please execute ///civicrm/menu/rebuild?reset=1&triggerRebuild=1 which fixes the trigger and function definitions in the database.
Catorghans's user avatar
  • 3,544
7 votes

ER diagram for the latest Civicrm , Foreign key in Structure, test cases/plans

I will answer your questions #1 and #2. (I'm not sure what you mean by #3. If #3 is sufficiently unrelated to #1 and #2, I would suggest creating a separate question for it) Why an ER (Entity ...
Sean's user avatar
  • 3,168
7 votes

When will MySQL utf8mb4 support be mandatory?

It seems like it's still under discussion as of last week. See e.g. https://lab.civicrm.org/dev/core/issues/979
Demerit's user avatar
  • 22.5k
6 votes

timestamp mismatch

It turns out that if you are using Wordpress you need to set the timezone to specific location, e.g. London, rather than using the default UTC offset. When I used the London timezone the problem went ...
Marian Zastawny's user avatar
5 votes

Need help solving unserialize():Error at offset

This line reads the data from the table civicrm_setting and specifically the column value. You could use a SQL client to run the query: SELECT id, name, value FROM civicrm_setting; Typical values ...
Tim Otten's user avatar
  • 5,684
5 votes

Update DB Query fails sporadically when saving contact; nativecode=1205 ** Lock wait timeout exceeded

We have seen this on large instances. Things to do: upgrade to 5.13.5 (this also puts you close to the next ESR - a paid for service - which will be released on Nov20). There have been performance ...
KarinG - Semper IT's user avatar
5 votes

Possible Bug? Foreign key constraint error on upgrade to 5.31.0 (populating civicrm_relationship_cache)

Further to Pradeep Nayak's reply, the ultimate cause of the problems I was having were missing foreign key constraints on the civicrm_relationship table leaving orphaned data when contacts were ...
fred2's user avatar
  • 403
4 votes

INSTALLER fails. Database can't "SELECT GET_LOCK" at civicrm/install/index.php(271)

Here's a patch that seems to address the issue, although there could still be compatibility issues in the PEAR mysql and mysqli library versions used by CiviCRM. This patch is for CiviCRM 4.7.4: ...
Andrew's user avatar
  • 51
4 votes
Accepted

non-asci characters ending up in database

CiviCRM historically uses the CRM_Core_DAO::VALUE_SEPARATOR character as a serialization technique for storing multiple values in a field. Best practice is use the API for accessing values, or if you ...
Demerit's user avatar
  • 22.5k
4 votes
Accepted

ER diagram for the latest Civicrm , Foreign key in Structure, test cases/plans

2) You can use a tool like SchemaSpy to extract the structure of the database, have the foreign key displayed in a table or on a schema and navigate easily between related tables. You can see an ...
samuelsov's user avatar
  • 2,331
4 votes
Accepted

What character is VALUE_SEPARATOR?

In fact, if you use HEX() function, you can guess it's the ASCII code 01 which is not really readable : MySQL> SELECT substring(besoins_sp__114, 1,1) FROM ...
samuelsov's user avatar
  • 2,331
4 votes

My hosting company does not support SUPER privilege - can I use CiviCRM with them?

There are only two scenarios in which CiviCRM requires the SUPER privilege: You're using a very old version of MySQL. Versions of MySQL 5.1.6 and higher support the TRIGGER permission. Before that, ...
Jon G - Megaphone Tech's user avatar
4 votes
Accepted

SQL Syntax Error - When starting civicrm with joomla

it seems php 7.2 is not compatible with 5.x.x or i do not know how to do the configuration i think downgrade the php would be the best solution but i wonder if there is other answer, and how to do it....
Jennifer Lee's user avatar
4 votes

Update DB Query fails sporadically when saving contact; nativecode=1205 ** Lock wait timeout exceeded

Karin's answer is a good one. However, not all smart groups are created equal! Culling the right smart groups is what will fix your deadlocks. Identify your slow smart groups. Here's a script (...
Jon G - Megaphone Tech's user avatar
4 votes
Accepted

Possible Bug? Foreign key constraint error on upgrade to 5.31.0 (populating civicrm_relationship_cache)

Your system have orphan data in civicrm_relationship table. There are few rows in civicrm_relationship table that have contact id in column civicrm_relationship.contact_id_a or ...
Pradeep Nayak's user avatar
4 votes
Accepted

One database table very large

Thats from Civimobile extension and You can find quick solution at https://lab.civicrm.org/extensions/civimobileapi/-/issues/57#note_54817 One thing I have found is editing the scheduled job ...
Pradeep Nayak's user avatar
3 votes

MyISAM database but all civicrm_ tables are INNODB... is this a problem?

Single command to update all tables is: SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ' engine=InnoDB;') FROM information_schema.TABLES WHERE ENGINE = 'MyISAM';
xtylus's user avatar
  • 83
3 votes
Accepted

Funky errors in 'drush cvup' / 'drush cvupdb'

I ran into a similar problem when manually updating. Depending on how your database is configured the update will fail when trying to change the image_URL from VARCHAR(256) to VARCHAR(512). I wasn't ...
Sleewok's user avatar
  • 1,146
3 votes

Multiple Entry Custom Values : Find modified ID?

Don't know if this will help, but at least you can try it. :) The custom() hook is called after the db write on a custom table, so when the field is writen, you can't know which was the change, so ...
Albert V's user avatar
  • 472
3 votes
Accepted

INSTALLER fails. Database can't "SELECT GET_LOCK" at civicrm/install/index.php(271)

Another solution is to upgrade at least to CiviCRM 4.6.16 or to CiviCRM 4.7.7 or you can also patch your installation. If you are familair with patches you can also download a patch from the civi ...
Jaap Jansma - CiviCooP's user avatar
3 votes

"alter routine command denied to user" error when installing extensions?

The user does not have the permissions to alter and create routines (functions). This should fix it: GRANT CREATE ROUTINE, ALTER ROUTINE ON civicrm.* TO civicrm;
naomi's user avatar
  • 1,247
3 votes
Accepted

Should I change mysql.connect_timeout variable in php.ini?

I have definitely altered this variable for upgrades, but my notes show I only increased the values to 1800. I don't recall whether this was because I found that -1 didn't work, or because I ...
Chris Burgess's user avatar
3 votes

SQL to unlink contacts and drupal accounts

The table you are looking for is civicrm_uf_match with the following structure CREATE TABLE `civicrm_uf_match` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'System generated ID.', `...
Kainuk - CiviCooP's user avatar
3 votes
Accepted

How to check if DB table exists?

There is a specific CiviCRM function (but all the ways in the other answers will be just as good :-)): CRM_Core_DAO::checkTableExists($tableName) This function will return TRUE or FALSE.
ErikH - CiviCooP's user avatar
3 votes

Drupal - MySQL support not included in PHP

CiviCRM is looking for the function mysqli_connect(), which is provided via the mysqli ("MySQL improved") extension in PHP. To enable this, uncomment - extension=mysqli.so If that doesn't work, ...
Chris Burgess's user avatar
3 votes

What is required to run CiviCRM on Amazon RDS?

We haven't tried running CiviCRM on RDS yet but we have been shifting a Drupal installation across to AWS. A few things we've noted so far that are relevant: It helps if the RDS instance is in the ...
John Twyman's user avatar
3 votes

Using an External (custom) Table in a Custom Report

Check out an example here - this is a report that joins tables the extension creates/maintains with other civicrm core tables to produce this report: https://github.com/jake-mw/CDNTaxReceipts/blob/...
KarinG - Semper IT's user avatar
3 votes

My hosting company does not support SUPER privilege - can I use CiviCRM with them?

You will either need to get a hosting plan that allows root access and "binary logging" or pay your host to install it. I recommend the former. In my experience, managed types of hosting don't tend to ...
Christia's user avatar
  • 2,457

Only top scored, non community-wiki answers of a minimum length are eligible