Skip to main content
Share Your Experience: Take the 2024 Developer Survey
15 votes

How to find and/or fix missing indices?

Disclaimer, as with other answers, this is aimed at a fairly technical person who kinda understands what they're doing and has made lots of backups :-) As Sophie points out you can find the exact ...
artfulrobot's user avatar
  • 3,932
11 votes
Accepted

What is the installation canary?

What is the installation canary? The civicrm_install_canary is fundamentally a test to see how well we control/understand the installation process. It's part of a bigger topic, so bear with me in ...
Tim Otten's user avatar
  • 5,684
10 votes

How to find and/or fix missing indices?

The pop-up message should have a link "View details and manage alerts" that takes you to the System Status page. That includes an Update Indices button (yes there is a typo in 4.7.19 but it doesn't ...
Aidan's user avatar
  • 13.5k
10 votes
Accepted

Where are checksums stored in the database?

The checksum is an md5 hash of the value in the database field civicrm_contact.hash, the Contact ID, the current timestamp and the life-span. Therefore, as long as the contact hash stays the same (it ...
bgm's user avatar
  • 3,431
9 votes
Accepted

SOLVED: 'DB Error: extension not found' after PHP upgrade to version 7.0

Summarising the above conversation: The upgrade of PHP to version made the PEAR DB extension unavailable. So the exception "DB Error: extension not found" was thrown. Changing to the database ...
Kainuk - CiviCooP's user avatar
9 votes
Accepted

How to get CiviCRM Views to work in Drupal 8 with separate CiviCRM database

I had the same problem today, so I looked in the source code. In civicrm.install there's a function called _civicrm_get_db_config. It's looking in the $databases array for an element with a key ...
Jon G - Megaphone Tech's user avatar
9 votes
Accepted

How do I safely export my database and import it on a new server?

You can export the civicrm database without triggers and functions and After importing and making sure you have CiviCRM working, recreate the triggers by running 'civicrm/menu/rebuild?reset=1&...
Pradeep Nayak's user avatar
8 votes

Database Trigger error message

If you're using binary logging, you may need to add a line to your MySQL or MariaDB configuration (/etc/mysql/my.cnf) to proceed with the installation. log_bin_trust_function_creators = 1
James Bradach's user avatar
8 votes
Accepted

Change domain name (wordpress)

Below are the simplified instructions taken from Moving an Existing Installation to a New Server or Location, but specific to answer your question. Open the file wp-content/plugins/civicrm/civicrm....
Ghost's user avatar
  • 614
8 votes

How to Export full back up of entire database

Exports and backups serve different purposes: 'export' refers to an extract of data to use in another system, 'backup' refers to recovery in the event of system failure, recovery from bad user actions ...
Aidan's user avatar
  • 13.5k
7 votes
Accepted

CiviCRM 4.7 - DB Constraint Violation - possibly dashboard_id should possibly be marked as mandatory for this API

Maybe you can try to run the upgrade script again to go from 4.7.10 to 4.7.12 http://<your_wordpress_home>/wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1 Documented on the ...
Kainuk - CiviCooP's user avatar
7 votes
Accepted

Upgrade fails with CiviCRM_API3_Exception: "API error: Could not delete payment processor type"

This looks to be a problem with an entity_type row of PaymentProcessorType in the civicrm_managed table. To show the offending row: select * from civicrm_managed where entity_type='...
G H's user avatar
  • 1,146
6 votes

Migration error: “The user specified as a definer does not exist”

Maybe you do not have ssh access and MySQL access. But this can also done from the user interface. To rebuild the triggers use the url: http://<<servername>/civicrm/menu/rebuild?reset=1&...
Kainuk - CiviCooP's user avatar
6 votes
Accepted

Is CiviCRM a 'master database' / 'master system'?

Yes, CiviCRM would be a great match for what you're describing. CiviCRM is a central 'master' information hub that has quite a bit of reach out of the box: membership data (What Is CiviMember? and ...
Allen Hutchison's user avatar
6 votes
Accepted

How to reduce database bloat for faster upgrading?

Best to review the tables which are largest in your DB, and also identify which queries during the upgrade take the longest. This is a chicken-and-egg problem, which means you might review the tables ...
Chris Burgess's user avatar
6 votes

How to find and/or fix missing indices?

After upgrading to 4.7.19 I found that indices cannot be created automatically; you can look at your CiviCRM error log to see which database statement is causing a fatal error - you might see problems ...
mfb's user avatar
  • 96
6 votes

Implementations Basics (Costs, Timescales, etc)

Honestly without a significant amount of detail regarding your current database, how you're going to use CiviCRM, what kind of site it is being connected to, etc, no one can give you anything but a ...
Jenni Simonis's user avatar
6 votes
Accepted

Ran direct SQL update to bulk update contact names, changes not appearing until editing and saving

It sounds like you imported the first_name and last_name values - but the value at the top of the record is the display_name. You have two options: Use your SQL script to update the display_name ...
Jon G - Megaphone Tech's user avatar
6 votes

CiviCRM 5.9.1 Cannot Read Database Information

Your DB connection specifies mysql://, and you are using PHP7.2. The MySQL extension was deprecated in PHP 5.5 and removed in PHP 7.0. Try switching the two DB connect strings in civicrm.settings.php ...
Chris Burgess's user avatar
6 votes

Split Data from Wordpress Database

That's really two operations: splitting the combined db to separate WP and Civi ones, and migrating. For the migration part see the manual. To split the db, you could make a duplicate of the ...
Aidan's user avatar
  • 13.5k
6 votes
Accepted

database upgrade script failing: Call to undefined method CRM_Upgrade_Incremental_php_FourOne::getMajorMinor()

After some chat on MM we identified that the installation had a file CRM/Upgrade/Incremental/FourOne.php That file has been removed from the current release but the usual Joomla upgrade process ...
Aidan's user avatar
  • 13.5k
5 votes

How does CiviCRM handle multiple users editing the same record simultaneously?

Tested on CiviCRM 4.7: two users can edit the same contact record, however, at the moment of saving the contact record, the second user to save the contact record will get a warning that the contact ...
bgm's user avatar
  • 3,431
5 votes

Older CiviCRM that does NOT require TRIGGER privileges?

I'd recommend approaching the problem the other way round: find a hoster that works with the latest versions of Civi rather than find a version of Civi that works with your current hoster. You will ...
Aidan's user avatar
  • 13.5k
5 votes

How to find and/or fix missing indices?

Had the same problem when I went from 4.7.14 to 4.7.20, same resolution as @mfb but with a different index. Default location for the error logs is /sites/default/files/civicrm/ConfigAndLog ...
Sophie Miron's user avatar
5 votes
Accepted

4.7.20 upgrade -- missing indices warning, but index already exists?

This thread helped me: How to find and/or fix missing indices? I've aggregated the SQL listed there below, copy it and run it via phpMyAdmin: ALTER TABLE civicrm_prevnext_cache DROP INDEX index_all;...
Neil Z's user avatar
  • 184
5 votes

Where is the civicrm database?

You can find the civicrm database listed in the civicrm.settings.php <wordpress>/wp-content/uploads/civicrm/civicrm.settings.php Apart from that , you have two possibilities 1)Wordpress and ...
harshal's user avatar
  • 841
5 votes

How can I find members

You can also just click in the search bar at the left of the Civi menu and select "Contact ID".
BobS's user avatar
  • 739
5 votes
Accepted

Insert and Get New ID in Extension

You could do something like CRM_Core_DAO::executeQuery("SELECT LAST_INSERT_ID()");. If your needs are simple that seems like the easiest. Probably to do it "right", you would use civix generate:...
Demerit's user avatar
  • 23.1k
5 votes

database upgrade script failing: Call to undefined method CRM_Upgrade_Incremental_php_FourOne::getMajorMinor()

We also experienced the same problem when upgrading from 5.36.1 to 5.37.2. Inspired by the answer from Aidan I went and looked in civicrm/CRM/Upgrade/Incremental/php/ and found a few files with old ...
thoni56's user avatar
  • 1,241
4 votes

Adding states to countries

There is no specialized mechanism for updating the state/province values in the database. You can file an issue in JIRA (https://issues.civicrm.org/) and provide the details there, and someome from ...
choster's user avatar
  • 1,900

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