MySQL Error #1449 – The user specified as a definer does not exist in database
Jun 16, 2013 - by kurinchilamp / MySql / Post Comment
The reason why this message is shown is because the user for the view does not exist in the database.
There are few ways by which we can remove this error
i) Alter statement
ii) Create the specified user in the database
iii) Modify the .frm files related to the view and set the definer
We will show the Alter statement method to achieve the desired results
# To fix it:
mysql> ALTER DEFINER = 'root'@'localhost' VIEW `mytableview` AS select * from cities;
mysql> SELECT * FROM mytableview;
Sometimes it so happens that the view statement will be a big selection of fields with joins in it. Export the table first to get the required SELECT statement for the view and then change the DEFINER
Continue Reading