0

While the back-end is working - e.g. I can add fields to profiles, etc. -, I see form data perfectly fine when calling pages, I cannot modify or add contacts resulting in

Sorry but we are not able to provide this at the moment. DB Error: unknown error

The log shows the following:

#6 /*/wordpress/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1449 ** The user specified as a definer ('backup_Mk047aB'@'%') does not exist")

Searching the CiviCRM database - I cannot find a reference to a user called "backup_Mk047aB" (not anywhere in Wordpress databases either).

A previous post notes that

You will get more details in civicrm log file (*/file/civicrm/ConfigAndLog). Also the main reason of this type error is, we are using few fields that are disabled. check custom fields status that are using for contact. see here

I then tried using my webpage form and populated all available fields of all profiles and then get

Database Error Code: The user specified as a definer ('backup_Mk047aB'@'%') does not exist, 1449

Additional details:

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => INSERT INTO civicrm_value_eda_individual_characteristic_2  ( name_of_affiliation_10,address_line_1_11,address_line_2_12,entity_id ) VALUES ( '','Henriette','',2 ) ON DUPLICATE KEY UPDATE name_of_affiliation_10 = '',address_line_1_11 = 'Henriette',address_line_2_12 = '' [nativecode=1449 ** The user specified as a definer ('backup_Mk047aB'@'%') does not exist]
[type] => DB_Error
[user_info] => INSERT INTO civicrm_value_eda_individual_characteristic_2  ( name_of_affiliation_10,address_line_1_11,address_line_2_12,entity_id ) VALUES ( '','Henriette','',2 ) ON DUPLICATE KEY UPDATE name_of_affiliation_10 = '',address_line_1_11 = 'Henriette',address_line_2_12 = '' [nativecode=1449 ** The user specified as a definer ('backup_Mk047aB'@'%') does not exist]
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_value_eda_individual_characteristic_2  ( name_of_affiliation_10,address_line_1_11,address_line_2_12,entity_id ) VALUES ( '','Henriette','',2 ) ON DUPLICATE KEY UPDATE name_of_affiliation_10 = '',address_line_1_11 = 'Henriette',address_line_2_12 = '' [nativecode=1449 ** The user specified as a definer ('backup_Mk047aB'@'%') does not exist]"]
)

Although I've been back-upping my site - this error just came along...

I'm lost und would love to meet user:backup_Mk047aB - any ideas!?

1

OK - This is really heinous!!! I've been trying all day - posted the query and after doing that read following set of instructions on how to do Alternate Moving the database using phpMyAdmin -> see the link and look at the heading Post Import Activities. It reads

Very Important: If you have custom data profiles set up in your civiCRM, they may be present but for some unknown reason not be active. Go to your Administer >> Customize >> Custom Data and select "View and Edit Custom Fields". Select "Edit Field" for any one of the custom fields in the group and save it without making any changes. This will make civiCRM aware of the custom data fields and everything should be back on track.

I've got two set of custom fields, did what I'd been tolded = didn't work; did it again with the second set = and voila, everything works again.

There's two things on my mind:

1.) Can any of the more tenured members comment on what the problem is - it must be a bug, it can't be by design!?

2.) Who the heck is user:backup_Mk047aB???

  • You elaborate here on your question. So it is better to add this insight to your question instead of creating an answer. – Kainuk - CiviCooP Aug 24 '18 at 18:11
1

Let me do a guess (the problem is already solved, so probably we will never find out what happened).

The problem is caused not by a CiviCRM bug but by a MySQL peculiarity. In MySQL it is possible to define a trigger on a table. That is a piece of code that executes when a row is added or updated. Custom tables have triggers (they update the timestamp of the related table). If you want to make a backup and export the table, the trigger is also exported. And MySQL also exports in the trigger code the name of the user that makes the export. Your first question was who is backup_Mk047aB? Most likely the database user used for the backup.

In editing the definition of the custom field you force CiviCRM to recreate the trigger code. But now it is recreated with the correct user, so the error disappears.

This is, however, a complicated workaround. It is more convenient to force a rebuild by calling the url:

http://example.org.org/wp-admin/admin.php?page=CiviCRM&q=civicrm/menu/rebuild&reset=1&triggerRebuild=1

See https://docs.civicrm.org/sysadmin/en/latest/troubleshooting/#trigger-rebuild.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.