mysql的简介和使用

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> 

猜你喜欢

转载自www.cnblogs.com/inmeditation/p/11563995.html
今日推荐