I'm an idiot. I completely forgot about USER():

mysql> select user(), SUBSTRING_INDEX(user(), '@', -1);
+-----------------+----------------------------------+
| user()          | SUBSTRING_INDEX(user(), '@', -1) |
+-----------------+----------------------------------+
| [EMAIL PROTECTED] | localhost                        |
+-----------------+----------------------------------+

More details in the usual place:

http://dev.mysql.com/doc/mysql/en/information-functions.html

____________________________________________________________
Eamon Daly



----- Original Message ----- From: "Stanton, Brian" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Wednesday, April 27, 2005 2:07 PM
Subject: RE: host info



The 'Connection' output from the 'status' command is actually what I was
looking for.  However, most likely it will be a jdbc connection to mysql,
not the mysql client, so I'll have to see if it works that way or not.

Thanks,
Brian Stanton

-----Original Message-----
From: Eamon Daly [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 2:04 PM
To: Stanton, Brian; mysql@lists.mysql.com
Subject: Re: host info


I don't know if it's possible in MySQL.

That said, in the mysql client, you can type '\s' for
'status'. Look for 'Current user' in the output.

____________________________________________________________
Eamon Daly


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to