由瑞典*MySQL* AB 公司开发,目前属于Oracle 公司。与其他大型数据库管理系统例如Oracle、DB2、SQL Server等相比,MySQL规模小,功能有限,但是它体积小、速度快、成本低,且它提供的功能对稍微复杂的应用已经够用,这些特性使得MySQL成为世界上最受欢迎的开放源代码数据库。下载地址:- 火山引擎访问地址:https://mirrors.ivolces.com/mysql/- 公网访问地址:https://mirrors.volces.com/mysql/## 配置方法请参照[官方文档](...
本文主要探讨 mysqldump 是如何保证备份一致性的。# 关键参数如何保证备份的一致性使用到如下两个关键参数### 1. --single-transaction加上这个参数目的在于,在备份 innodb 表前,将事务的隔离级别设置为 REPEATABLE READ,同时显示的开启事务快照,在事务中进行一致性快照读。摘自官方文档[1]> This option sets the transaction isolation mode to REPEATABLE READ and sends a START TRANSACTION SQL statement to the serv...
本文主要探讨 mysqldump 是如何保证备份一致性的。# 关键参数如何保证备份的一致性使用到如下两个关键参数### 1. --single-transaction加上这个参数目的在于,在备份 innodb 表前,将事务的隔离级别设置为 REPEATABLE READ,同时显示的开启事务快照,在事务中进行一致性快照读。摘自官方文档[1]> This option sets the transaction isolation mode to REPEATABLE READ and sends a START TRANSACTION SQL statement to the...
这里使用 MySQL 官方文档进行说明:* The number of internal on-disk temporary tables created by the server while executing statements[1].* If an internal temporary table is created as an in-memory table but becomes too large, MySQL automatically converts it to an on-disk table[2].```sqlmysql> show global status like '%Created_tmp_disk_tables%';+-------------------------+-------+| Variable_n...
这里使用 MySQL 官方文档进行说明:* The number of internal on-disk temporary tables created by the server while executing statements[1].* If an internal temporary table is created as an in-memory table but becomes too large, MySQL automatically converts it to an on-disk table[2].```sqlmysql> show global status like '%Created_tmp_disk_tables%';+-------------------------+-------+| Variable_n...
这里使用 MySQL 官方文档进行说明:- The number of internal on-disk temporary tables created by the server while executing statements[1].- If an internal temporary table is created as an in-memory table but becomes too large, MySQL automatically converts it to an on-disk table[2].```sqlmysql> show global status like '%Created_tmp_disk_tables%';+-------------------------+-------+| Variable...
mysql> show variables like 'max_connections';+-----------------+-------+| Variable_name | Value |+-----------------+-------+| max_connections | 2000 |+-----------------+-------+1 row in set (0.00 sec)```摘自官方文档:The maximum permitted number of simultaneous client connections[1]| **System Variable** | **[max_connections]** || --- | --- || Scope | Global || Dynamic | Yes |##...
mysql> show variables like 'max_connections';+-----------------+-------+| Variable_name | Value |+-----------------+-------+| max_connections | 2000 |+-----------------+-------+1 row in set (0.00 sec)```摘自官方文档:The maximum permitted number of simultaneous client connections[1]|System Variable |[max_connections] ||:--|---||Scope | Global ||Dynamic | Yes |## mysql.user表...
由于 AWS RDS MySQL 有其特殊性,这里着重介绍以下两点:* 如何开启 binlog 日志* 如何设置 binlog 保留期# **操作步骤**## 如何开启 binlog 日志在自建 MySQL 中,开启 binlog 日志记录,需要设置此参数:log_bin。而在 AWS RDS for MySQL 中,如果需要打开 binlog 日志记录,需要将备份保留期设置为非零正值。参考文档[1]。需要注意的是,您无法修改默认参数组。如果数据库实例使用默认参数组,则创建新的参数组并将其与数据库实...
# 前言MySQL 中的优化器是基于成本的优化器(CBO),所谓基于成本,代表着运行目标 SQL 语句需要消耗的 CPU,扫描行数,IO 等,这些信息是基于统计信息来获得的。如果统计信息不准确,优化器很可能选择那些不够优化,甚至是... # 参考文档[1] [https://dev.mysql.com/doc/refman/5.7/en/innodb-persistent-stats.html](https://dev.mysql.com/doc/refman/5.7/en/innodb-persistent-stats.html)[2] [https://dev.mysql.com/doc/refman/5.7/...
MySQL 控制台上,选择监控告警,引擎监控,连接,我们可以看如下指标:![图片](https://lf6-volc-editor.volccdn.com/obj/volcfe/sop-public/upload_44d0bd93752f12e2bb01908a4648efd2.png)目前关于连接相关的指标有三个,分别为:1. 当前打开的连接数2. 已创建的线程数3. 运行的线程数下面会介绍下这几个指标在RDS 中是如何取值的。# 当前打开的连接数当前打开的连接数取自Threads_connected,意为已连接的 thread,官方文档描...
官方文档描述如下:The number of currently open connections[1]。```sqlmysql> show global status like 'Threads_connected%';+-------------------+-------+| Variable_name | Value |+-------------------+-------+| Threads_connected | 10 |+-------------------+-------+1 row in set (0.00 sec)```控制台显示如下:![alt](https://lf3-volc-editor.volccdn.com/obj/volcfe/sop-public/upload_3266a...
# 前言在 MySQL 中,timestamp 采用 4 字节进行存储,取值范围是 '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC [1]。如果时间来到 2038 年,而官方没有采取行动,那么 MySQL 将无法正常使用。# 问题复现... MySQL 官方后续会支持 my_time_t 64 位的版本,截止到目前,还有 16 年之久,留给 MySQL 的时间还有很多。# 参考文档[1] [https://dev.mysql.com/doc/refman/5.7/en/datetime.html](https://dev.mysql.com/doc/refm...