ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist
This error occurs when there is any view / trigger in that database (mysql in your case) that has a definer (in other words a user) that is a definer for the view but then the user itself doesnt exists. A fresh install of mysql should have that user
mysql> select user,host from mysql.user where user='mysql.infoschema';
+------------------+-----------+
| user | host |
+------------------+-----------+
| mysql.infoschema | localhost |
+------------------+-----------+
1 row in set (0.00 sec)
With the permissions :
mysql> show grants for 'mysql.infoschema'@'localhost';
+-------------------------------------------------------+
| Grants for mysql.infoschema@localhost |
+-------------------------------------------------------+
| GRANT SELECT ON *.* TO `mysql.infoschema`@`localhost` |
+-------------------------------------------------------+
1 row in set (0.00 sec)
For some reason that user is missing / deleted in your users list and is why when you list tables its also checking for views in it and complaining about its missing definer.
Solution :
Simply create the user with the permissions above and that should stop showing the error.
Create user:
mysql> CREATE USER 'mysql.infoschema'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)
Grant permissions:
mysql> GRANT SELECT ON *.* TO `mysql.infoschema`@`localhost`;
Query OK, 0 rows affected, 1 warning (0.00 sec)
The user specified as a definer does not exist - unknown user
I had to set a password for the mysterious user:
UPDATE user SET `authentication_string` = PASSWORD('******') WHERE `User` = 'usaarbit';
...and then grant:
GRANT ALL ON *.* TO 'usaarbit'@'%' IDENTIFIED BY '******'; FLUSH PRIVILEGES;
Solved.
Related Topics
Removing Leading Zeroes from a Field in a SQL Statement
How to Select True/False Based on Column Value
Finding the Highest Average Salary in SQL
Insert Value into Table If Conidition Is Met At Least One Time
What's the Best Way to Capitalise the First Letter of Each Word in a String in SQL Server
How to Remove Special Characters in Column With MySQL
Mysql - Operand Should Contain 1 Column(S)
Show Zero If There Is No Record Count - Oracle SQL Query
Sql: Find Country Name of the Team Having the Most Players Who Have Never Scored a Goal
Sql: Returning the Most Common Value for Each Person
Simple Check for Select Query Empty Result
Query to Calculate Average of Employee Salaries Working Under Manager in SQL
Node.Js Mssql Tedius Connectionerror: Failed to Connect to Localhost:1433 - Connect Econnrefused
Find a Matching Value in Date Range and Return Value
Left Join Without Duplicate Rows from Left Table
The Network Adapter Could Not Establish the Connection in SQL Developer
How to Change Column Order in a Table Using SQL Query in SQL Server 2005