Use the show databases
command as
demonstrated below:
[root@probe root]#
mysql -u root -p
Enter password:PASSWORD
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21 to server version: 3.23.58
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+----------+
| Database |
+----------+
| mysql |
| test |
+----------+
2 rows in set (0.00 sec)
mysql> quit
Bye
[root@probe root]#