0

I was just trying to move three old CiviCRM drupal 7 sites from Ubuntu 16, PHP7.2 and mysql 5.7 Ubnuntu 22.04 lts, php 7.4 and mysql 8 and have run into some issues.

two of the three sites work but throw this warning:

Missing Phone numeric function

Your database is missing a function to populate the 'Phone number' field with a numbers-only version of the phone.

Trying to rebuild the DB triggers throws an Unknown database error and just hangs.

The third site, doesn't work at all and throws this error:

RuntimeException: CiviCRM has not bootstrapped sufficiently to fire event "hook_civicrm_entityTypes". in Civi\Core\CiviEventDispatcher->dispatch() (line 190 of /var/www/html/mysite/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php).

The host drupal 7 site is connecting to the DB fine.

I've tried:

  1. resetting the file permissions in the files directory
  2. resyncing the site files (I used rsync)
  3. re-downloading the database.

the mysql dump seem to go into the new DB without errors.

Is it possible to move a CiviCRM install from Mysql 5.7 to Mysql 8 or do I have to install an older version? And what will happen in a year or so when 5.7 is EoL?

2 Answers 2

1

MySQL8 is working fine for us so far.

You may need to play around with the parameters of mysqldump to make a useable dump that works out of the box:

To fix that warning you need to add the parameter --routines when creating the dump: https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_routines

Adding --triggers might help with having an urgent need to recreate those triggers.

The error message for your third site seems to be somewhat vague. For example there was a recent fix for dealing with missing extensions that went into CiviCRM 5.50.2: https://github.com/civicrm/civicrm-core/pull/23716. But you need to be more specific about your environment and what you did to get there.

4
  • Our sites are all 5.50.1 so that error might explain it. We recently had issues with the sparkpost extension... I'll have to investigate.
    – tanbog
    Jul 22 at 2:09
  • The mysql options fixed the warnings. With the third site it appears when we fixed the sparkpost module recently it's owner got changed to root and so rsync skipped the directory... hence the bootstrapping error.
    – tanbog
    Jul 22 at 3:19
  • The numeric trigger problem returned even with with your fix. came back after rebuilding paths. Attempting to re-build the triggers does not work. It throws an "unknown DB error" and then just hangs.
    – tanbog
    Jul 31 at 11:40
  • You may want to create a new question for that and definately do include the full debug log with it. The Phone numeric function is a stored routine. The civicrm database user may just lack the permissions to CREATE ROUTINE or ALTER ROUTINE. Aug 1 at 16:14
2

MySQL 5.7 to 8 is a notable upgrade by itself. Have you gone through the mysql_upgrade process? See for example, https://dev.mysql.com/blog-archive/inplace-upgrade-from-mysql-5-7-to-mysql-8-0/

Alternatively now would be a good time to consider switching to MariaDB.

Both are supported for CiviCRM.

1
  • I didn't really do an upgrade. I have a setup a fresh server with mysql8 and Ubuntu 22.04 and rsync'd the files. I was hoping a mysqldump from the 5.7 server would run on the mysql 8 server without issue.
    – tanbog
    Jul 21 at 7:15

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.