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


Share it onShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Written by kurinchilamp

Website: http://

Leave a Reply

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

Read previous post:
Linux: How the password is stored, salted and hashed securely?

In earlier systems, passwords were stored in the file /etc/passwd and they were not encrypted. After the user is created,...