General error: 1449 when fetching Mysql Database records

Asked

Viewed 1,595 times

1

I am getting the error below while doing SELECT:

SELECT * FROM vn_horario_view;

SQLSTATE[HY000]: General error: 1449 The user specified as a Finer ('root'@'localhost') does not exist

How to resolve this error?

  • Only this in error ? Nothing else came out ?

  • I supplemented the error message.

1 answer

2


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 the root and change the name of the new user to root (Gambiarra)!

Same problem in Soen

  • Thank you Junior. Solved !

Browser other questions tagged

You are not signed in. Login or sign up in order to post.