Answers.Body: <p>I would redump without triggers and import them back</p>
  <pre><code>mysqldump -uusername -p db_name --skip-triggers &gt; dumbname.mysql
      
  drop database db_name;
      
  create database db_name;
      
  mysql -uusername -p db_name &lt; dumbname.mysql
  </code></pre>
  <p>Run the rebuild trigger command <a href="http://example.org/civicrm/menu/rebuild?reset=1&amp;triggerRebuild=1" rel="nofollow noreferrer">http://example.org/civicrm/menu/rebuild?reset=1&amp;triggerRebuild=1</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-23T15:52:31.167Z
Answers.Text: Thank you Pradeep Nayak! I will skip triggers next time. For this one I removed the triggers based on this SO answer:https://stackoverflow.com/a/30339930
Answers.UserDisplayName: Pierre
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-23T13:55:00.430Z
Answers.LastActivityDate: 2024-07-23T13:55:00.430Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I'm facing the same issue as the one solved here: <a href="https://civicrm.stackexchange.com/questions/8854/migration-error-the-user-specified-as-a-definer-does-not-exist">Migration error: “The user specified as a definer does not exist”</a>. However I have to consider the following points:</p>
  <ul>
  <li>the database it way to huge to sed into it (i.e. replacing the old definer by the new one)</li>
  <li>database access configuration is no more local but remote</li>
  <li>the problem occurs even when I try to flush the cache from cli (cv flush) : <code>DELETE FROM civicrm_queue  WHERE (  civicrm_queue.id = 1 ) [nativecode=1449 ** The user specified as a definer ('old_definer'@'localhost') does not exist]</code></li>
  </ul>
  <p>Is there a clean way to achieve this migration process?</p>
  <ul>
  <li>CiviCRM: 5.75</li>
  <li>Drupal: 10.3.1</li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-23T11:43:21.513Z
Comments.Text: can you rebuild the trigger http://example.org/civicrm/menu/rebuild?reset=1&triggerRebuild=1
Comments.UserDisplayName: Pradeep Nayak
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-23T12:27:48.647Z
Comments.Text: Thank you Pradeep Nayak, I already tried and got the same query's error: `DELETE FROM `civicrm_queue` WHERE ( `civicrm_queue`.`id` = 1 )`.
Comments.UserDisplayName: Pierre
Tags: <drupal><migration>
Title: Migration: how to replace old definer
ThreadText: # Migration: how to replace old definer
  
  (Asked by: username_0 on 2024-07-23)
  
  I'm facing the same issue as the one solved here: [Migration error: “The user specified as a definer does not exist”](https://civicrm.stackexchange.com/questions/8854/migration-error-the-user-specified-as-a-definer-does-not-exist). However I have to consider the following points:
  
  * the database it way to huge to sed into it (i.e. replacing the old definer by the new one)
  * database access configuration is no more local but remote
  * the problem occurs even when I try to flush the cache from cli (cv flush) : `DELETE FROM civicrm_queue WHERE ( civicrm_queue.id = 1 ) [nativecode=1449 ** The user specified as a definer ('old_definer'@'localhost') does not exist]`
  
  Is there a clean way to achieve this migration process?
  
  * CiviCRM: 5.75
  * Drupal: 10.3.1
  
  **Tags:** drupal, migration
  
  > **Comments:**
  > **username_1**: can you rebuild the trigger http://example.org/civicrm/menu/rebuild?reset=1&triggerRebuild=1  
  > **username_0**: Thank you username_1, I already tried and got the same query's error: `DELETE FROM `civicrm_queue` WHERE ( `civicrm_queue`.`id` = 1 )`.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-07-23. Score: 1 | Accepted answer
  
  I would redump without triggers and import them back
  
  ```
  mysqldump -uusername -p db_name --skip-triggers > dumbname.mysql
      
  drop database db_name;
      
  create database db_name;
      
  mysql -uusername -p db_name < dumbname.mysql
  
  ```
  
  Run the rebuild trigger command <http://example.org/civicrm/menu/rebuild?reset=1&triggerRebuild=1>
  
  > **Comments:**
  > **username_0**: Thank you username_1! I will skip triggers next time. For this one I removed the triggers based on this SO answer:https://stackoverflow.com/a/30339930  
  
  ---
  
  