How to check statement of creating a particular MySQL database?

MySQLMySQLi Database

With the help of CREATE DATABASE db-name command, we can check the statement of creating any MySQL database.

mysql> SHOW CREATE DATABASE Sample;
+----------+-------------------------------------------------------------------+
| Database | Create Database                                                   |
+----------+-------------------------------------------------------------------+
| sample   | CREATE DATABASE `sample` /*!40100 DEFAULT CHARACTER SET latin1 */ |
+----------+-------------------------------------------------------------------+
1 row in set (0.00 sec)

The output shows how MySQL database named Sample has been created.

raja
Published on 19-Feb-2018 07:18:42
Advertisements