I've reviewed the other related tickets here, but the solutions either don't seem applicable or are things we've already got in place - file format and character encoding are what they need to be I think.

This problem Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535 only appears when we are doing an export to csv. Our database is MySQL8.0 in AWS Aurora RDS. I think I understand the problem, but I'm hoping to get confirmation of that.

We have - frankly - an absurd amount of custom fields, and this particular export has most of them in it. We first saw the problem when we increased the size of one of the select fields because the export was being truncated. The field was varchar(255), but some of the select options were long sentences, so as I understand it, the temporary table prepared for the export used that varchar(255) for it's length causing the exports to get cut off for that field. We increased that varchar to 400, and they were no longer cut off. When we do the full export though, we now get the above database error.

The confirmation question: Is that description of how the exports work accurate? Temporary table with the column size set by the size of the select element (rather than anything to do with the size of the options)?

This problem is only showing up in exports, which isn't really all that important. The solution that I have in mind is just have users split this export into two parts... I think that will work. But, is this a growing problem that we'll eventually see in normal use?

1 Answer 1


You will need to convert all the CiviCRM tables to utf8mb4 or as a workaround convert civicrm_contact table to utf8mb4 by running below query.

ALTER TABLE civicrm_contact CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Alternatively, you could build the search using searchkit with all the columns you need and export the results in CSV

  • civicrm_contact (and all the other tables I've checked) are already in utf8mb4_unicode_ci and the database default characterset is utf8mb4, so I'm not sure that's an answer for me. Building the search in SearchKit is a good suggestion though, I'll give that a try. It is literally almost 100 fields though so it'll take a bit :)
    – zip
    Jan 12 at 16:22
  • Actually, with SearchKit the export still takes me to the same Field Mapping, so it has the same problem.
    – zip
    Jan 12 at 17:07
  • 1
    See also lab.civicrm.org/dev/core/-/issues/2784
    – Demerit
    Jan 12 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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