认识
官网:https://www.mysql.com
文档:https://dev.mysql.com/doc
仓库:https://github.com/mysql
MySQL 是一种关系型数据库管理系统,由瑞典 MySQL AB 公司开发,后被 Oracle 公司收购。MySQL 是基于 C 和 C++语言编写并使用了 SQL 语言进行数据处理的软件。简而言之,MySQL 是种广泛应用的关系型数据库管理系统,能够用来存储和管理数据。
组成
命令程序 and 配置文件
MySQL 软件包中的默认包含的命令工具。
性质
WIP
构建
版本选择
通常由需求方决定,我们则是根据需求进行部署。
硬件要求
MySQL 5.7 Minimum Server Requirements
How do you determine the hardware needed for a server?
Oracle doesn’t publish such specs because it depends so much on how the server will be used, and on the OS.
See MySQL Memory Allocation for some pointers.
You could probably get by with 512MB or less, but I would not want to.
One core is usually adequate. — MySQL won’t use more than one core per connection, so having multiple cores is not needed until you have a lot of traffic.
MySQL has done just fine with simple spinning disks; RAID and/or SSDs are nice, but not a requirement.
However, if you are going with less than 4GB of RAM, you will need to crank down the tunables. Swapping is really bad for performance.
容器镜像
Docker Hub / mysql – Official Image | https://hub.docker.com/_/mysql/
[I] SRC: docker.io/bitnamilegacy/mysql:5.7
[I] DST: ccr.ccs.tencentyun.com/d3rm-3rd/docker.io_bitnami_mysql:5.7
[I] SRC: docker.io/library/mysql:8.0.22
[I] DST: ccr.ccs.tencentyun.com/d3rm-3rd/docker.io_library_mysql:8.0.2
通过 asdf 安装
# 2025-10-29 通常,我们不会使用该方式部署 MySQL 服务,而是通过该方式来部署 MySQL 客户端来连接远程服务器或进行其他测试。
asdf plugin add mysql
asdf list all mysql # Check all avaiable versions.
asdf install mysql 8.0.33
asdf set –home mysql 8.0.33
on Ubuntu 21.04 TLS | MySQL Latest
# 安装数据库服务 apt-get install mysql-server # 进行初始化设置 mysql_secure_installation # 测试连接 mysql -u root -p
on Ubuntu 20.04 LTS MySQL 5.7
How To Install MySQL 5.7 on Ubuntu 20.04 | ComputingForGeeks
wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
dpkg -i mysql-apt-config_0.8.12-1_all.deb
...
# 在配置过程中,选择 Ubuntu Bionic 版本,选择 MySQL 5.7 版本;
...
apt-get install mysql-server=5.7.37-1ubuntu18.04 \
mysql-community-server=5.7.37-1ubuntu18.04 \
mysql-client=5.7.37-1ubuntu18.04 \
libmysqlclient-dev=5.7.37-1ubuntu18.04
on Docker | with Docker Compose | MySQL 5.7
version: '3.1'
services:
mysql-57:
image: mysql:5.7
command: --default-authentication-plugin=mysql_native_password --max-connections=10000
restart: always
environment:
MYSQL_ROOT_PASSWORD: 0YKm24TV4qdbb
TZ: Asia/Shanghai
ports:
- 3306:3306
volumes:
- ./data:/var/lib/mysql/
on Docker | with Docker Compose | MySQL 8.0
MySQL 8.0.22,Ubuntu 22.04.4 LTS,能够成功运行。
CPU does not support x86-64-v2 in the latest 8.4.0 · Issue #1055 · docker-library/mysql
MySQL 8.0.37,Ubuntu 22.04.4 LTS,产生 …… Fatal glibc error: CPU does not support x86-64-v2 …… 错误,需要调整虚拟化平台 CPU 类型。例如,使用 Host 类型。或,更换镜像,mysql 8.4.0-oraclelinux8 来解决问题。
应用
MySQL 被广泛应用于各种场合,包括但不限于:
1)网站系统如 WordPress、Drupal 等都使用 MySQL 作为数据库。
2)数据仓库用于存储大量数据并进行分析。
3)电子商务用于处理订单、库存和客户信息等。
4)数据集成用于整合来自不同数据源的数据。
参考
从认识、组成、性质、应用、改进方面来介绍 MySQL 数据库 —— ChatGPT 4.0
MySQL 5.7 Reference Manual
《MySQL5.7 从入门到精通》| 刘增杰清华大学出版社 | 面向新人的书;
- 简介:http://blog.csdn.net/brucexia/article/details/53738596
- 源码及相关资料的下载地址:http://pan.baidu.com/s/1bFF1c6
《MySQL 必知必会》| 新手入门必备;
- 注意:此书写作时,MySQL 最新的稳定版本为 5.1。所以是一本比较旧的书了;
- Homepage:http://www.forta.com/books/0672327120
- 相关资料:http://www.forta.com/books/0672327120/#footer