36
11
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?
eg. if you login to mysql via
mysql -ulalala
wherelalala
user doesn't exist, you will be allowed to login as 'anonymous' mysql user, namely''@'localhost'
. In this case returns of functions would beUSER()= lalala@localhost
andCURRENT_USER() = @localhost
– Dimitry K – 2015-01-27T14:23:11.3202
@DimitryK When that happens, you can run
– RolandoMySQLDBA – 2015-01-27T14:38:21.593SHOW GRANTS;
to see what permissions you have. Even if you see nothing exceptUSAGE
, you still need to be aware that certain test databases are 100% accessible to an anonymous user. See my postMySQL : Why are there “test” entries in mysql.db?
(http://dba.stackexchange.com/q/13361/877)+1 for
SHOW GRANTS
, strange that I haven't stumbled upon it though reading numerous Mysql Tutorials. – Dimitry K – 2015-01-27T15:18:26.887