I have multiple text console session open and log in as different users into different consoles. I forget after while which consoles belong to which user, it would be nice to not have to quit and log back in.
How do I see which user I am logged in as?
Is there a way to change which user I logged in as with out logging out?
Answer
Actually, you need to use two functions
SELECT USER(),CURRENT_USER();
USER() reports how you attempted to authenticate in MySQL
CURRENT_USER() reports how you were allowed to authenticate in MySQL
Sometimes, they are different
No comments:
Post a Comment