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
In earlier systems, passwords were stored in the file /etc/passwd and they were not encrypted. After the user is created,...