Product Solutions Support
Try MemSQL

SHOW DATABASES

Shows the list of databases that exist on this MemSQL instance.

SHOW DATABASES [EXTENDED]
[LIKE 'pattern']

Notes

Output (EXTENDED option)

Column Description
Database Name of a database in the MemSQL instance
Commits Number of committed transactions
Role Database replication role
State Current state (:ref:database_states)
Position Current position in the transaction log, formatted as <LogFileId>:<ByteOffsetInLogFile>
Details Optional message about the current state
AsyncSlaves Number of currently attached asynchronous slaves
SyncSlaves Number of currently attached synchronous slaves

Examples

memsql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| memsql             |
| test               |
+--------------------+
3 rows in set (0.00 sec)


memsql> SHOW DATABASES EXTENDED;
+--------------------+---------+-------------+---------------------+----------+-------------------------+-------------+------------+
| Database           | Commits | Role        | State               | Position | Details                 | AsyncSlaves | SyncSlaves |
+--------------------+---------+-------------+---------------------+----------+-------------------------+-------------+------------+
| information_schema |    NULL | NULL        | NULL                | NULL     | NULL                    | NULL        | NULL       |
| memsql             |       3 | master      | online              | 0:183    | NULL                    | 0           | 0          |
| foo                |     112 | master      | online              | 1:202    | NULL                    | 1           | 0          |
| bar                |    NULL | master      | recovering snapshot | 2:89123  | Recovery progress 17.2% | 0           | 1          |
| example_slave      |      37 | async slave | replicating         | 0:8870   | NULL                    | 0           | 0          |
+--------------------+---------+-------------+---------------------+----------+-------------------------+-------------+------------+
Was this article useful?