ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist
Hi all,
I've been having some issues with MySql and Laravel. When I try to migrate or show a table I get this error:
ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist
I have no clue how or why the definer is set as 'mysql.infoschema' I'm also not able to find an easy clear way to change that. Any help or pointers in the right direction would be much appreciated.
This commonly occurs when exporting views/triggers/procedures from one database or server to another as the user that created that object no longer exists. So basically you need to make sure you use the correct user in your database for all your migrations.
It sounds like you have the wrong user in the first place. Also if you did add/delete/update users make sure you run flush privileges; in mysql to make sure all caches are cleared regarding privileges ;)
I'm also having the same problem. I've got mysql 8.0.15 Homebrew on both of my computers. When I run 'use db_name' from the iMac I get the' definer ('mysql.infoschema'@'localhost') does not exist' error. When I checked out what users are in the mysql.users table, mysql.infoschema did not show up as a user on the iMac, which is the one getting the error. On my air, that user does exist. Try: select host, user from mysql.user;
Hi. I have the same problem (user mysql.infoschema does not exists in mysql.user table. I looked at gladgladwrap "solution" but it does not work for me. Can someone help please?
I think I'm quite late to the party but if you have any triggers set on your tables and the user who created it, has been deleted, then you will run into this error. I was facing the same issue. Tried clearing cache, config but nothing worked.
I checked my db and found that there was a trigger set on table. Removing that trigger from the table did the trick.
If you have any definer statements in you sql file, you can remove them before restoring.