Cannot access MySQL views when moving a PHP application to another server

My current project is about making some changes to an already created web application (PHP / MySQL). The previous developer used views to display data. I got the application on my computer to get to know it, and I can't get these views to work (I don't get any output in the application).

I searched the Internet for this seems to have a problem creating a view with a single database user, and that user no longer exists.

Anyone who has come up with this question before? How can this be solved?

+3
source share
2 answers

SQL, , ,

CREATE DEFINER = 'userWhoDoesNotExist@thisServer' VIEW viewName AS ....

DEFINER =, currenct.

+4

, , root-. -

ALTER VIEW brokenView DEFINER='newuser'

. , root, , .

+1

Source: https://habr.com/ru/post/1788678/


All Articles