SQL SHOW DATABASE

SQL SHOW DATABASE

 SQL SHOW DATABASE


Use the SHOW DATABASES statement to list all databases on the MySQL database server. First login to the MySQL server with the privileged user and list all databases.

Command:-

SHOW DATABASES;

Example:-

Login to your MySQL server using the command line. You will get MySQL database prompt like mysql>. Now use the SHOW DATABASES statement to list all databases.

mysql> SHOW DATABASES;

+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| mydb               |
| performance_schema |
+--------------------+
4 rows in set (0.03 sec)

You can also use the following command directly on the operating system command prompt without login into MySQL first.

$ mysqlshow -u root -p
Reactions

Post a Comment

0 Comments

close