Quoting [EMAIL PROTECTED]:

> You might look at the USER() and CURRENT_USER() functions.
>
> http://dev.mysql.com/doc/mysql/en/Information_functions.html

Aha!  I think this is what I was looking for: "the client host from which [I]
connected".  I'll have to do some in-query string processing to extract the
host and resolve the IP but that's at least doable.

> However, I think those will end up showing you the NAT server's address
> and not the user's un-NATed address.  If it were simple to de-NAT an
> address, most firewalls would become very ineffective. That's what NAT is
> there to do, protect the user behind the firewall by obscuring their
> internal address, right?

Yes, but fortunately I'm looking for the NAT server's address, not the client's
NAT'ed address.  The client knows its address and could insert this into the
SQL query itself.  Both the client and the server also know their own addresses
(of course).  But the only person who knows the un-NAT'ed address is the SQL
server: the clients don't even necessarily know they're being NAT'ed.  That's
why I need to get this information from the server-side.

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

Reply via email to