日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

mysql怎么显示、查询现有数据库列表?(show databases;)怎么删除现有数据库?(drop database <库名>)

發(fā)布時(shí)間:2025/3/20 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql怎么显示、查询现有数据库列表?(show databases;)怎么删除现有数据库?(drop database <库名>) 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

顯示所有數(shù)據(jù)庫

show databases;命令

C:\Users\Dontla>mysql -u root -p Enter password: **** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 Server version: 8.0.23 MySQL Community Server - GPLCopyright (c) 2000, 2021, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show database; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1 mysql> show databases; +--------------------+ | Database | +--------------------+ | flask_demo | | flask_sql_demo | | information_schema | | mysql | | performance_schema | | sakila | | sys | | world | +--------------------+ 8 rows in set (0.05 sec)mysql>

刪除數(shù)據(jù)庫

drop database <庫名>

mysql> drop database flask_demo; Query OK, 0 rows affected (0.03 sec)mysql> show databases; +--------------------+ | Database | +--------------------+ | flask_sql_demo | | information_schema | | mysql | | performance_schema | | sakila | | sys | | world | +--------------------+ 7 rows in set (0.00 sec)mysql>

總結(jié)

以上是生活随笔為你收集整理的mysql怎么显示、查询现有数据库列表?(show databases;)怎么删除现有数据库?(drop database <库名>)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。