'MySQL unable to create user account

I am rebuilding on of my MySQL servers -

I did a complete data export / import into a new instance, and now I am recreating all the user accounts.

I am however receiving this error for just one of the accounts I am trying to recreate:

#4006 - Operation CREATE USER failed for 'site_27'@'%' as it is referenced as a definer account in a view.

I am also (as expected) unable to open the views owned by this user:

#1449 - The user specified as a definer ('site_27'@'%') does not exist

The user site_27 does not currently exist in this instance, the error comes from some viewes which exist in a database.. Why am I unable to create it? How can I create it?

Is it a requirement that I create the users before importing the data?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source