This topic describes how to view the currently connected MySQL database in OceanBase Developer Center (ODC) or by using an SQL statement.
View the currently connected database in ODC
Prerequisites
ODC has connected to the database.
Procedure
Log on to the ODC console.
On the Connections page, select the connected database and click Open.
Hover over the connection name on the menu bar at the top of the page.
Expected result
The database username is displayed.

Note
In the preceding figure,
information_schemais the currently connected database.
View the currently connected database by using an SQL statement
SQL statement
show databases;
Examples
View all databases.
obclient> show databases; +--------------------+ | Database | +--------------------+ | oceanbase | | information_schema | | mysql | | test | | test2 | | rainoon | +--------------------+ 6 rows in setEnter the
testdatabase.obclient> use ny; Database changedView the currently connected database.
obclient> show processlist; +------------+------+----------------------+------+---------+------+--------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +------------+------+----------------------+------+---------+------+--------+------------------+ | 3221601356 | root | 47.100.XX.XX:22716 | ny | Query | 0 | ACTIVE | show processlist | +------------+------+----------------------+------+---------+------+--------+------------------+ 1 row in setNote
In the preceding sample code,
nyin thedbcolumn indicates the currently connected database.