# 官方提供@yunTaoScripts Mariadb 🔥🔥
# 基本概念与安装
RDBMS 关系型数据库管理系统,所谓的库就是一个文件夹,在库里有很多表。
- 清屏可以使用
ctrl+l
- 如果想使用其他结束符的话,使用
delmiter
- 如果不想执行一条语句的话,在语句后面加上
\c
- 更好的显示效果,可以使用
\G
结束 - 提示符默认都是 mysql>,如果想更改提示符的话,可以使用
\R
- 在 mysql 提示符里执行系统命令
system
MariaDB [(none)]> system ls
aa.txt id_rsa.pub para.txt test yunpress yuntao.work_bundle.crt yuntao.work.key
MariaDB [(none)]> system pwd
/root
- 查看所有库
MariaDB [mysql]> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| member |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.00 sec)
- 切换库
MariaDB [mysql]> use member;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
- 查看当前库
MariaDB [member]> status
--------------
mysql Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1
Connection id: 15
Current database: member
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 5.5.68-MariaDB MariaDB Server
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 15 days 20 min 51 sec
Threads: 1 Questions: 345 Slow queries: 0 Opens: 20 Flush tables: 2 Open tables: 45 Queries per second avg: 0.000
--------------
# 基本操作
# DDL 数据定义语言
# DML 数据管理语言
# DQL 数据查询语言
← 快速链接