Show the name of database I'm currently logged in odoo12
also user name and password
into odoo 12 there is already the database name is display into the top right corner. Active the developer mode.
if you want to get db name using the python code, then write self.env.cr.dbname into your python method.