I'm getting the error below when doing SELECT:
SELECT * FROM vn_horario_view;
SQLSTATE [HY000]: General error: 1449 The user specified as a definer ('root' @ 'localhost') does not exist
How do I resolve this error?
I'm getting the error below when doing SELECT:
SELECT * FROM vn_horario_view;
SQLSTATE [HY000]: General error: 1449 The user specified as a definer ('root' @ 'localhost') does not exist
How do I resolve this error?
If you imported the objects from another database you may have lost some DEFINER
.
Try:
SELECT CONCAT("ALTER DEFINER='youruser'@'host' VIEW ",
table_name, " AS ", view_definition, ";")
FROM information_schema.views
WHERE table_schema='your-database-name';
You can also create a new user giving him full access, if everything runs correctly you delete root and rename the new user to root (Gambiarra)!
Same problem in SOen