DATABASE()

Returns the name of the current ODBC/JDBC data source.  If a DSN-less connection is used, it returns an empty string.

 

Example:

SELECT DATABASE() returns CONNX9SAMPLES32