Q:

Migration error: “The user specified as a definer does not exist”

I recently moved the site to a new server and changed from a remote to a local MySQL server with different credentials. Most things seem to be working fine, but even though I've flushed caches, editing phone numbers leads to an AJAX "Network Error" message and the following in my logs: 
$Fatal Error Details = Array (
  [callback] => Array (
    [0] => CRM_Core_Error
    [1] => handle )
  [code] => -1
  [message] => DB Error: unknown error
  [mode] => 16
  [debug_info] => INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id )
    VALUES ( 200025 , 2 , 1 , 0 , '6464646464' , NULL , 1 )
    [nativecode=1449 ** The user specified as a definer ('OLDUSER'@'%') does not exist]
  [type] => DB_Error
  [user_info] => INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id )
    VALUES ( 200025 , 2 , 1 , 0 , '6464646464' , NULL , 1 )
    [nativecode=1449 ** The user specified as a definer ('OLDUSER'@'%') does not exist]
  [to_string] => [db_error: message="DB Error: unknown error"
    code=-1
    mode=callback
    callback=CRM_Core_Error::handle prefix=""
    info="INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id ) VALUES ( 200025 , 2 , 1 , 0 , '6464646464' , NULL , 1 ) [nativecode=1449 ** The user specified as a definer ('OLDUSER'@'%') does not exist]"]
)
OLDUSER is nowhere in my configs and I have run both drush cc all and drush cvapi system.flush. Any ideas?

A:

Xavier, your answer would have worked if I had had the luxury of re-importing. 
It turns out that there is a single function in the CiviCRM DB that for some reason uses a hard-coded username and password. I went in to the DB, located the "civicrm_strip_non_numeric" function and updated the username and password. Problem solved.

