Answers.Body: <p>Clearly CiviCRM won't work with MySQL 8.9 yet; at least not in my environment.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-02T12:08:31.110Z
Answers.LastActivityDate: 2018-11-02T12:08:31.110Z
Answers.UserDisplayName: Stephen Palmstrom
Body: <p>MySQL 8.0 has been released.  Will CiviCRM work with it?  I tried migrating a test database to it, and CiviCRM under Joomla failed.</p>
  
  <pre><code>Oct 31 12:36:35  [info] $Fatal Error Details = Array (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; handle
          )
  
      [code] =&gt; -2
      [message] =&gt; DB Error: syntax error
      [mode] =&gt; 16
      [debug_info] =&gt;  SELECT  v.label as label ,v.name as value, v.grouping as grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_GB g WHERE  v.option_group_id = g.id   AND  g.name            = 'languages'   AND  g.is_active       = 1  AND v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge")) )  ORDER BY v.weight [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_G' at line 1]
      [type] =&gt; DB_Error
      [user_info] =&gt;  SELECT  v.label as label ,v.name as value, v.grouping as grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_GB g WHERE  v.option_group_id = g.id   AND  g.name            = 'languages'   AND  g.is_active       = 1  AND v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge")) )  ORDER BY v.weight [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_G' at line 1]
      [to_string] =&gt; [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info=" SELECT  v.label as label ,v.name as value, v.grouping as grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_GB g WHERE  v.option_group_id = g.id   AND  g.name            = 'languages'   AND  g.is_active       = 1  AND v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge")) )  ORDER BY v.weight [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_G' at line 1]"] )
  </code></pre>
  
  <p>The SQL below runs happily against MySQL 5.7 whilst it fails against MySQL 8.0 with</p>
  
  <blockquote>
    <p>"SELECT" is not valid at this position for this server version,
    expecting '(', WITH</p>
  </blockquote>
  
  <p>SQL:</p>
  
  <blockquote>
    <p>SELECT  v.label as label ,v.name as value, v.grouping as grouping FROM
    civicrm_option_value_en_GB v,
           civicrm_option_group_en_GB g WHERE  v.option_group_id = g.id   AND  g.name            = 'languages'   AND  g.is_active       = 1  AND
    v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN
    (SELECT id FROM civicrm_component WHERE name IN
    ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge"))
    )  ORDER BY v.weight </p>
  </blockquote>
  
  <p>Replacing the first line with: </p>
  
  <blockquote>
    <p>SELECT  v.label as label ,v.name as value, v.grouping as `grouping`</p>
  </blockquote>
  
  <p>solves the problem.</p>
  
  <p>Clearly some work is needed before CiviCRM will work with MySQL 8.0</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-31T19:05:05.460Z
Comments.Text: When answering your own question, there's a checkbox indicating that you want to answer it yourself.  This lets others chime in separately later, and your answer can be up/downvoted separately from the question.  You may want to edit this to put your answer separately.
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <mysql-8.0>
Title: MySQL v8.0 released. Will CiviCRM work with it?
ThreadText: # MySQL v8.0 released. Will CiviCRM work with it?
  
  (Asked by: username_0 on 2018-10-31)
  
  MySQL 8.0 has been released. Will CiviCRM work with it? I tried migrating a test database to it, and CiviCRM under Joomla failed.
  
  ```
  Oct 31 12:36:35  [info] $Fatal Error Details = Array (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )
  
      [code] => -2
      [message] => DB Error: syntax error
      [mode] => 16
      [debug_info] =>  SELECT  v.label as label ,v.name as value, v.grouping as grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_GB g WHERE  v.option_group_id = g.id   AND  g.name            = 'languages'   AND  g.is_active       = 1  AND v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge")) )  ORDER BY v.weight [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_G' at line 1]
      [type] => DB_Error
      [user_info] =>  SELECT  v.label as label ,v.name as value, v.grouping as grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_GB g WHERE  v.option_group_id = g.id   AND  g.name            = 'languages'   AND  g.is_active       = 1  AND v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge")) )  ORDER BY v.weight [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_G' at line 1]
      [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info=" SELECT  v.label as label ,v.name as value, v.grouping as grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_GB g WHERE  v.option_group_id = g.id   AND  g.name            = 'languages'   AND  g.is_active       = 1  AND v.is_active = 1  AND ( v.component_id IS NULL  OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge")) )  ORDER BY v.weight [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping FROM   civicrm_option_value_en_GB v,
         civicrm_option_group_en_G' at line 1]"] )
  
  ```
  
  The SQL below runs happily against MySQL 5.7 whilst it fails against MySQL 8.0 with
  
  > "SELECT" is not valid at this position for this server version,
  > expecting '(', WITH
  
  SQL:
  
  > SELECT v.label as label ,v.name as value, v.grouping as grouping FROM
  > civicrm\_option\_value\_en\_GB v,
  > civicrm\_option\_group\_en\_GB g WHERE v.option\_group\_id = g.id AND g.name = 'languages' AND g.is\_active = 1 AND
  > v.is\_active = 1 AND ( v.component\_id IS NULL OR v.component\_id IN
  > (SELECT id FROM civicrm\_component WHERE name IN
  > ("CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge"))
  > ) ORDER BY v.weight
  
  Replacing the first line with:
  
  > SELECT v.label as label ,v.name as value, v.grouping as `grouping`
  
  solves the problem.
  
  Clearly some work is needed before CiviCRM will work with MySQL 8.0
  
  **Tags:** mysql-8.0
  
  > **Comments:**
  > **username_1**: When answering your own question, there's a checkbox indicating that you want to answer it yourself.  This lets others chime in separately later, and your answer can be up/downvoted separately from the question.  You may want to edit this to put your answer separately.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-11-02. Score: 1
  
  Clearly CiviCRM won't work with MySQL 8.9 yet; at least not in my environment.
  
  
  ---
  
  