C:\Users\Administrator.EIT-20171107TIY>mysql -u root -p
Enter password: ******
mysql> exit;
Bye
- 3、創(chuàng)建數(shù)據(jù)庫(kù),有兩種方式
- 1、create datebase 數(shù)據(jù)庫(kù)名
C:\Users\Administrator.EIT-20171107TIY>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.15 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
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> create database database_test;
Query OK, 1 row affected (0.01 sec)
mysql>
- 2、使用 mysqladmin 創(chuàng)建數(shù)據(jù)庫(kù)
C:\Users\Administrator.EIT-20171107TIY>mysqladmin -u root -p create database_tes
t1
Enter password: ******
- 4、刪除數(shù)據(jù)庫(kù),有兩種方式
- 1、drop database 數(shù)據(jù)庫(kù)名
mysql> drop database database_test;
Query OK, 0 rows affected (0.01 sec)
- 2、使用 mysqladmin 刪除數(shù)據(jù)庫(kù)
C:\Users\Administrator.EIT-20171107TIY>mysqladmin -u root -p drop data_test;
Enter password: ******
Dropping the database is potentially a very bad thing to do.
Any data stored in the database will be destroyed.
Do you really want to drop the 'data_test;' database [y/N] y
Database "data_test;" dropped
- 5、選擇數(shù)據(jù)庫(kù) ,use 數(shù)據(jù)庫(kù)名
mysql> use runoob;
Database changed
mysql>
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀(guān)點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。