Answers.Body: <p>Turns out there's a problem if you're trying to move the Civi database from a server to another (in my case from production to my localhost).</p>
  
  <p>You need to change the db user in the mysqldump file. 
  We did it using a script and the sed command</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-12T09:18:41.453Z
Answers.LastActivityDate: 2018-02-12T09:18:41.453Z
Answers.UserDisplayName: Pierre
Body: <p>I'm trying to upgrade, following the official guide, but when I get to the url : 
  wp-admin/admin.php?page=CiviCRM&amp;q=civicrm/upgrade&amp;reset=1</p>
  
  <p>I get the folowing error message :</p>
  
  <pre><code>Initialization Error
  
  Array
  (
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; simpleHandler
          )
  
      [code] =&gt; -1
      [message] =&gt; DB Error: unknown error
      [mode] =&gt; 16
      [debug_info] =&gt; 
  SELECT
     option_value.id          as id,
     option_value.label       as label,
     option_value.value       as value,
     option_value.name        as name,
     option_value.description as description,
     option_value.weight      as weight,
     option_value.is_active   as is_active,
     option_value.is_default  as is_default
  FROM
     civicrm_option_value_fr_FR  as option_value,
     civicrm_option_group_fr_FR  as option_group  WHERE option_group.id = option_value.option_group_id  AND option_group.name = 'languages' ORDER BY weight [nativecode=1449 ** The user specified as a definer ('pui'@'%') does not exist]
      [type] =&gt; DB_Error
      [user_info] =&gt; 
  SELECT
     option_value.id          as id,
     option_value.label       as label,
     option_value.value       as value,
     option_value.name        as name,
     option_value.description as description,
     option_value.weight      as weight,
     option_value.is_active   as is_active,
     option_value.is_default  as is_default
  FROM
     civicrm_option_value_fr_FR  as option_value,
     civicrm_option_group_fr_FR  as option_group  WHERE option_group.id = option_value.option_group_id  AND option_group.name = 'languages' ORDER BY weight [nativecode=1449 ** The user specified as a definer ('pui'@'%') does not exist]
      [to_string] =&gt; [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info="
  SELECT
     option_value.id          as id,
     option_value.label       as label,
     option_value.value       as value,
     option_value.name        as name,
     option_value.description as description,
     option_value.weight      as weight,
     option_value.is_active   as is_active,
     option_value.is_default  as is_default
  FROM
     civicrm_option_value_fr_FR  as option_value,
     civicrm_option_group_fr_FR  as option_group  WHERE option_group.id = option_value.option_group_id  AND option_group.name = 'languages' ORDER BY weight [nativecode=1449 ** The user specified as a definer ('pui'@'%') does not exist]"]
  )
  </code></pre>
  
  <p>Any help would be greatly appreciated as I'm new to Civi... thanks!</p>
  
Tags: <wordpress><upgrade><4.7><4.6>
Title: Upgrade error from 4.6 to 4.7 - WordPress
ThreadText: # Upgrade error from 4.6 to 4.7 - WordPress
  
  (Asked by: username_0 on 2017-12-12)
  
  I'm trying to upgrade, following the official guide, but when I get to the url : 
  wp-admin/admin.php?page=CiviCRM&q=civicrm/upgrade&reset=1
  I get the folowing error message :
  Initialization Error
  
  Array
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => simpleHandler
          )
  
      [code] => -1
      [message] => DB Error: unknown error
      [mode] => 16
      [debug_info] => 
  SELECT
     option_value.id          as id,
     option_value.label       as label,
     option_value.value       as value,
     option_value.name        as name,
     option_value.description as description,
     option_value.weight      as weight,
     option_value.is_active   as is_active,
     option_value.is_default  as is_default
  FROM
     civicrm_option_value_fr_FR  as option_value,
     civicrm_option_group_fr_FR  as option_group  WHERE option_group.id = option_value.option_group_id  AND option_group.name = 'languages' ORDER BY weight [nativecode=1449 ** The user specified as a definer ('pui'@'%') does not exist]
      [type] => DB_Error
      [user_info] => 
  SELECT
     option_value.id          as id,
     option_value.label       as label,
     option_value.value       as value,
     option_value.name        as name,
     option_value.description as description,
     option_value.weight      as weight,
     option_value.is_active   as is_active,
     option_value.is_default  as is_default
  FROM
     civicrm_option_value_fr_FR  as option_value,
     civicrm_option_group_fr_FR  as option_group  WHERE option_group.id = option_value.option_group_id  AND option_group.name = 'languages' ORDER BY weight [nativecode=1449 ** The user specified as a definer ('pui'@'%') does not exist]
      [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::simpleHandler prefix="" info="
  SELECT
     option_value.id          as id,
     option_value.label       as label,
     option_value.value       as value,
     option_value.name        as name,
     option_value.description as description,
     option_value.weight      as weight,
     option_value.is_active   as is_active,
     option_value.is_default  as is_default
  FROM
     civicrm_option_value_fr_FR  as option_value,
     civicrm_option_group_fr_FR  as option_group  WHERE option_group.id = option_value.option_group_id  AND option_group.name = 'languages' ORDER BY weight [nativecode=1449 ** The user specified as a definer ('pui'@'%') does not exist]"]
  )
  
  Any help would be greatly appreciated as I'm new to Civi... thanks!
  
  **Tags:** wordpress, upgrade, 4.7, 4.6
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-02-12. Score: 0 | Accepted answer
  
  Turns out there's a problem if you're trying to move the Civi database from a server to another (in my case from production to my localhost).
  
  You need to change the db user in the mysqldump file.
  We did it using a script and the sed command
  
  
  ---
  
  