If the definer is different and you've set the security to apply to the
*definer* of the view (instead of the *invoker* of the view), of course the
results might be different since the definer might not have enough
permissions to access the tables in the view:

[image: image.png]

Either change the definer when creating the view, or apply security to the
invoker, or make sure the new definer can access the tables involved.

(if you SQLdumped the database on server A to recreate it on server B, this
is quite usual. Review the "DEFINER" part on the "create view" statements
in the dump file)

On Mon, Jan 13, 2020 at 1:00 PM dw1970 <dw1...@gmail.com> wrote:

> Have a simple flex app, say FlexApp to retrieve two tables and a view from
> MySQL DB in webhosting service provider, say A and B. Currently, FlexApp
> runs in service provider A with no problem at all. The FlexApp can be seen
> in http://www.bbrchk.com/testdb/testdb.html Because we need to move to a
> new
> service provider B, therefore we recreate the two tables and the view and
> install the same FlexApp in service provider B. But, the result is
> different. The data in the view cannot be retrieved. Can be seen in
> http://www.bbrclubhk.com/testdb/testdb.html
>
> Have used charles webproxy, but it only say
> flex.messaging.messages.ErrorMessage for my StaffviewpositionService (this
> is the php service for retrieving the view in MySQL)
>
> The SQL to create the view in both service provider is the same which is
>
> CREATE VIEW staffviewposition AS SELECT
>   s.iddStaff,
>   s.txtLastName,
>   s.txtFirstName,
>   p.iddPosition,
>   p.txtPosition
> FROM staff AS s, position AS p WHERE s.iddPosition = p.iddPosition;
> When I go to the phpMyAdmin to edit the view, I found the definer is
> different, service provider A (one that works) gives the definer as myname@
> %
> while in service provider B (one that does NOT work) give myname@localhost.
> Is this difference caused the problem?
>
> Both of the StaffviewpositionService.php are basically the same except the
> IP address to the service provider, of course.
>
> Please advise how to resolve the view unable to retrieve data problem
> resided in service provider B.
>
>
>
>
>
> --
> Sent from: http://apache-flex-users.2333346.n4.nabble.com/
>

Reply via email to