MySQL Error #1449 – The user specified as a definer does not exist in database

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



Written by kurinchilamp

Website: http://

Leave a Reply

Your email address will not be published. Required fields are marked *