MySQL 的定义 MySQL 是一种开源关系型数据库管理系统。与其他关系型数据库一样,MySQL 将数据存储在由行和列组成的表中。用户可以使用结构化查询语言(通常称为 SQL)定义、操作、控制和查询数据。由于 MySQL 是开源的,因此它的大量功能是在超过 25 年与用户密切合作的过程中开发出来的。
MySQL 软件是开源的 MySQL 是开源的,这意味着按照 GNU 通用公共许可条款,该工具可以免费使用。这也意味着,任何人都可以根据自己的使用需求自由修改软件的源代码。这使得 MySQL 分支为其他数据库变体(例如 MariaDB 和 Percona Server for MySQL)。MySQL 也可以通过其他许可用于商业用途。
关系型数据库 MySQL 所属的数据库类别称为关系型数据库管理系统 (RDBMS)。关系型数据库是信息的集合,它以预定义的关系组织数据,数据存储在一个或多个由列和行构成的表(或称“关系”)中,用户可以轻松查看和理解不同数据结构之间的关系。关系是不同表之间的逻辑连接,根据这些表之间的交互建立。
下载
下载地址https://dev.mysql.com/downloads/在此页面中,需要选择你要安装的版本类型,我这里是Ubuntu系统所以选择 MySQL APT Repository,若你使用CentOS那么就使用MySQL Yum Repository
# 登录数据库 root@cby:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.35 MySQL Community Server - GPL
Copyright (c) 2000, 2023, 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> # 查看默认库 mysql> SHOW DATABASES; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.00 sec) # 选择使用mysql库 mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
# 使用其他主机进行登录数据库 root@cby:~# mysql -u root -p -h x.oiox.cn Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 11 Server version: 8.0.35 MySQL Community Server - GPL
Copyright (c) 2000, 2023, 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> mysql> mysql> ^DBye root@cby:~# root@cby:~#