ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist
Let's first conclude: there is a problem with
mysql.infoschema, and the solution is naturally simple. Basically, it is either to rebuild and add the account or solve the reason for the login failure, such as the error caused by the author's forcibly modifying the account
mysql.infoschema encryption method. The role of this account is an account that provides a way to access database metadata. If the account has a problem and executes show tables, the show databases command will naturally fail and report an error. Of course, you can check mysql log
/var/log/mysql/error.log for specific reasons.
I ran into this problem when I tried to install mysql locally, and the problem was solved after many debugging and online consulting. But I found that there are many online answers that are basically just tastings. Staying at the stage caused by the mysql upgrade, it can not be said that there is a problem, but it can only be said that it needs to be dig deeper. Therefore, the solutions provided basically stay at the stage of treating headaches and feet. Naturally, it is not universal. The reason why the upgrade causes this problem is that the encryption method of the account has changed after the upgrade, and the ultimate root cause is that there is a problem with the account.