Home  >  Article  >  Database  >  How to view mysql database creation statement under cmd

How to view mysql database creation statement under cmd

coldplay.xixi
coldplay.xixiOriginal
2020-08-27 15:01:014217browse

How to view the mysql database creation statement under cmd: first open the run and enter the [mysql -uroot -p] command to enter mysql; then execute the show database command to view the current database; finally execute show create database xxx. View the database creation statement.

How to view mysql database creation statement under cmd

【Related learning recommendations: mysql tutorial

How to view the mysql database creation statement under cmd:

1. Press win R to open the run, enter cmd and press Enter, as shown in the figure below

How to view mysql database creation statement under cmd

2. Enter the mysql -uroot -p command to enter mysql, as shown in the figure below

How to view mysql database creation statement under cmd

3. Execute the show database; command to view the current database, as shown in the figure below As shown

How to view mysql database creation statement under cmd

4, then execute show create database xxx to view the database creation statement, as shown in the figure below

How to view mysql database creation statement under cmd

5. After selecting the database, you can also see the database creation statement by executing the show create command, as shown in the figure below

How to view mysql database creation statement under cmd

#6. Finally, you can also view other databases in the selected database. The database creation statement of the database is as shown in the figure below

How to view mysql database creation statement under cmd

If you want to learn more about it, please pay attention to the php training column!

The above is the detailed content of How to view mysql database creation statement under cmd. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more