Alanaktion / phproject

A high performance full-featured project management system
https://www.phproject.org
GNU General Public License v3.0
387 stars 106 forks source link

PDOStatement: Access denied for user ' #382

Open Backpackstudio opened 5 years ago

Backpackstudio commented 5 years ago

An error occurs: "PDOStatement: Access denied for user '"

The cause of this error is that you are using views, but if you change database user name for some reasons, then old username is stored on view!

Alanaktion commented 5 years ago

There's not really a way for the application to solve this itself, either the definer on the views needs to match the user used in the application configuration, or the user needs to have access to other users' views (which it does by default as far as I know). I could add something to the documentation, but it's not something the application can solve itself since it's not allowed to update views it no longer owns.