mysql簡介
數據的所有存儲,檢索,管理和處理實際上是由數據庫軟件--DBMS(數據庫管理系統)完成的
mysql是一種DBMS,即它是一種數據庫軟件
mysql工具
mysql是一個客戶機-服務器的DBMS。
因此為了使用mysql,需要一個客戶機,即提供給mysql要執行的命令 的一個應用
mysql命令行應用程序是使用最多的應用程序之一,對於快速測試,和執行腳本非常有價值
[root@VM_0_7_centos mysql]# mysql -uroot -p'6HbfLn,_cC8a'
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 5.7.27
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>
mysql的使用
新建數據庫
mysql> create database sumyum;
Query OK, 1 row affected (0.00 sec)
mysql>
查看數據庫列表
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sumyum |
| sys |
+--------------------+
5 rows in set (0.00 sec)
mysql>
選擇進入數據庫
mysql> use sumyum;
Database changed
查看當前數據庫內可用表
mysql> show tables;
Empty set (0.00 sec)
刪除數據庫
mysql> drop database sumyum;
Query OK, 0 rows affected (0.00 sec)
mysql>