Error: The user specified as a definer ('root'@'%') does not exist

0

When I tried to execute procedure in MySQL database I got this error:

The user specified as a definer ('root'@'%') does not exist

Maybe someone has seen this error too?

1 Answer

Hi. You should run the following commands:

-- Remove current user
DROP USER 'root'@'%';
-- Add ROOT user again
CREATE USER 'root'@'%' IDENTIFIED BY 'ROOT_PASSWORD';
-- Add permissions
GRANT ALL PRIVILEGES ON * . * TO 'root'@'%';
FLUSH PRIVILEGES;

*That error may happen when you try to run some SQL commands as a ROOT user which was imported from another MySQL database

User rating:

Thanks, it helped me

2

Too many commands? Learning new language?

FavScripts.com is a free tool that allows you to save your favorite scripts and commands, then quickly find and copy-paste your commands with just few clicks.

Boost your daily productivity with FavScripts.com!

Post Answer