Examine these statements and output:
Which statement is true?
Examine these statements and output:
Which statement is true?
The output of the questions indicates that the user is logged in as 'rsmith@localhost', as shown by USER(). The CURRENT_USER() function shows 'accounting@localhost', and the @@proxy_user shows that the user is operating as the proxy user ''@'%'. These details demonstrate that although the user authenticated as 'rsmith@localhost', they are being authorized as the 'accounting@localhost' user through the proxy, given the proxy grant statement. Therefore, the correct statement is that the user is authorized as the 'accounting@localhost' user.
incorrect. You authenticate as your own account but are authorized as another. There B is not true, C is.
C is right
Explanation: The first statement grant proxy on accounting@localhost to ''@'%' grants the permission to the anonymous proxy user ''@'%' to use the accounting@localhost user as a proxy. The second statement Select user(),current_user(), @@proxy_user returns the output with three columns: USER() returns the current user as rsmith@localhost. CURRENT_USER() returns the authenticated user as accounting@localhost, which is the user that was granted the proxy permission in the first statement. @@proxy_user returns the current anonymous proxy user as ''@'%'. Therefore, statement B is true, which states that the user is authenticated as the anonymous proxy user ''@'%'.