bernie2436
bernie2436

Reputation: 23921

How do you find your user name from a mysql prompt?

I installed mysql on osx a million years ago. Now I need to actually use it. I can start mysql with this command

/usr/local/mysql/bin/mysql -v

How do I find out what my user name is from the mysql prompt?

Upvotes: 0

Views: 157

Answers (1)

exussum
exussum

Reputation: 18558

SELECT USER(),CURRENT_USER();

user is who you attempted to login as, current user is who you actually logged in as can be different

The docs are the best place to look for reasons why

http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_current-user

You are logged in as the user current_user returns

Upvotes: 1

Related Questions