Answers.Body: <p>MySQL8 is working fine for us so far.</p>
  <p>You may need to play around with the parameters of mysqldump to make a useable dump that works out of the box:</p>
  <p>To fix that warning you need to add the parameter <code>--routines</code> when creating the dump: <a href="https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_routines" rel="nofollow noreferrer">https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_routines</a></p>
  <p>Adding <code>--triggers</code> might help with having an urgent need to recreate those triggers.</p>
  <p>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: <a href="https://github.com/civicrm/civicrm-core/pull/23716" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/pull/23716</a>. But you need to be more specific about your environment and what you did to get there.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-22T02:09:07.503Z
Answers.Text: 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.
Answers.UserDisplayName: tanbog
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-22T03:19:17.070Z
Answers.Text: 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.
Answers.UserDisplayName: tanbog
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-31T11:40:45.690Z
Answers.Text: 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.
Answers.UserDisplayName: tanbog
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-01T16:14:00.183Z
Answers.Text: 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`.
Answers.UserDisplayName: Thomas Schüttler
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-21T14:44:14.223Z
Answers.LastActivityDate: 2022-07-21T14:44:14.223Z
Answers.UserDisplayName: Thomas Schüttler
Answers.Body: <p>MySQL 5.7 to 8 is a notable upgrade by itself.  Have you gone through the <code>mysql_upgrade</code> process?  See for example, <a href="https://dev.mysql.com/blog-archive/inplace-upgrade-from-mysql-5-7-to-mysql-8-0/" rel="nofollow noreferrer">https://dev.mysql.com/blog-archive/inplace-upgrade-from-mysql-5-7-to-mysql-8-0/</a></p>
  <p>Alternatively now would be a good time to consider switching to <a href="https://mariadb.com/database-topics/mariadb-vs-mysql/" rel="nofollow noreferrer">MariaDB</a>.</p>
  <p>Both are <a href="https://docs.civicrm.org/installation/en/latest/general/requirements/#mysql-version" rel="nofollow noreferrer">supported</a> for CiviCRM.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-21T07:15:14.513Z
Answers.Text: 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.
Answers.UserDisplayName: tanbog
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-18T09:36:14.143Z
Answers.LastActivityDate: 2022-07-18T09:36:14.143Z
Answers.UserDisplayName: Aidan
Body: <p>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.</p>
  <p>two of the three sites work but throw this warning:</p>
  <pre><code>Missing Phone numeric function
  
  Your database is missing a function to populate the 'Phone number' field with a numbers-only version of the phone.
  </code></pre>
  <p>Trying to rebuild the DB triggers throws an <code>Unknown database error</code> and just hangs.</p>
  <p>The third site, doesn't work at all and throws this error:</p>
  <pre><code>RuntimeException: CiviCRM has not bootstrapped sufficiently to fire event &quot;hook_civicrm_entityTypes&quot;. in Civi\Core\CiviEventDispatcher-&gt;dispatch() (line 190 of /var/www/html/mysite/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php).
  </code></pre>
  <p>The host drupal 7 site is connecting to the DB fine.</p>
  <p>I've tried:</p>
  <ol>
  <li>resetting the file permissions in the files directory</li>
  <li>resyncing the site files (I used rsync)</li>
  <li>re-downloading the database.</li>
  </ol>
  <p>the mysql dump seem to go into the new DB without errors.</p>
  <p>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?</p>
  
Tags: <mysql><mysql-5.7><mysql-8.0>
Title: Issue moving site from mysql 5.7 to mysql 8
ThreadText: # Issue moving site from mysql 5.7 to mysql 8
  
  (Asked by: username_0 on 2022-07-18)
  
  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:
  
  resetting the file permissions in the files directory
  resyncing the site files (I used rsync)
  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?
  
  **Tags:** mysql, mysql-5.7, mysql-8.0
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2022-07-21. Score: 1 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_0**: 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.  
  > **username_0**: 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.  
  > **username_1**: 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`.  
  
  ---
  
  ### Answer by username_2 on 2022-07-18. Score: 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](https://mariadb.com/database-topics/mariadb-vs-mysql/).
  
  Both are [supported](https://docs.civicrm.org/installation/en/latest/general/requirements/#mysql-version) for CiviCRM.
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  