大庆网站建设优化,湖南土特产销售网网站建设制作,潍坊建立企业网站公司,collectfrom企业网站模版↑ 关注“少安事务所”公众号#xff0c;欢迎⭐收藏#xff0c;不错过精彩内容~ 日前#xff0c;MySQL 8.2.0 创新版本已正式上线#xff0c;并提供安装包下载#xff0c;但 docker 镜像尚未更新。 在 MySQL 8.1.0 刚发版时也做过分析#xff0c;欢迎阅读#xff1a; 重… ↑ 关注“少安事务所”公众号欢迎⭐收藏不错过精彩内容~ 日前MySQL 8.2.0 创新版本已正式上线并提供安装包下载但 docker 镜像尚未更新。 在 MySQL 8.1.0 刚发版时也做过分析欢迎阅读 重磅MySQL 8.1.0 已来 本文将通过 MySQL 启动选项和系统参数的变更情况来深入了解 8.2.0 都有哪些变化。 启动 MySQL 8.2.0 这一小节不是本文的重点我们快速推进。 从官网直接下载二进制包并初始化运行。 初始化日志 [shawnyancentos7 ~]$ sudo /usr/local/mysql/bin/mysqld --initialize-insecure2023-10-26T01:57:36.185664Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.2023-10-26T01:57:36.187344Z 0 [System] [MY-013169] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.2.0) initializing of server in progress as process 1199632023-10-26T01:57:36.194573Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.2023-10-26T01:57:36.712452Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.2023-10-26T01:57:38.681960Z 6 [Warning] [MY-010453] [Server] rootlocalhost is created with an empty password ! Please consider switching off the --initialize-insecure option.2023-10-26T01:57:42.299632Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end. 服务器启动日志 [mysqlcentos7 ~]$ /usr/local/mysql/bin/mysqld2023-10-26T02:00:07.525736Z 0 [System] [MY-015015] [Server] MySQL Server - start.2023-10-26T02:00:08.462689Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.2.0) starting as process 1207432023-10-26T02:00:08.473638Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.2023-10-26T02:00:09.377582Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.2023-10-26T02:00:09.757717Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.2023-10-26T02:00:09.757776Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.2023-10-26T02:00:09.822331Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: :: port: 33060, socket: /tmp/mysqlx.sock2023-10-26T02:00:09.822417Z 0 [System] [MY-010931] [Server] /usr/local/mysql/bin/mysqld: ready for connections. Version: 8.2.0 socket: /tmp/mysql.sock port: 3306 MySQL Community Server - GPL.2023-10-26T02:00:22.899823Z 8 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: mysql_native_password is deprecated and will be removed in a future release. Please use caching_sha2_password instead 为了便于测试这里直接将 root 用户密码设为空并直接运行 mysqld 服务。 登陆 MySQL 并查看版本信息 删除的参数 (3) 1. abort-slave-event-count ❝ The deprecated server startup options --abort-slave-event-count and --disconnect-slave-event-count, deprecated in MySQL 8.0, have been removed in this release. Attempting to start mysqld with either of these options now results in an error. abort_slave_event_count / disconnect_slave_event_count 这两个启动参数在之前的版本中用做测试并非真的生产环境参数。 从 8.0.29 版本开始被标记为废弃状态从 8.2.0 开始正式被移除。 2. disconnect-slave-event-count 同上。 3. expire-logs-days expire_logs_days 参数用于设定二进制日志保留天数从 8.2.0 开始正式被移除。 从 MySQL 8.0.1 开始新增参数 binlog_expire_logs_seconds以秒为单位控制二进制日志的保留时长。 默认值为 2592000 即 30 天。最大值为 4294967295 即 unsigned int 最大值约 138 年。 在 MariaDB 中从 10.6.1 开始引入 binlog_expire_logs_seconds 参数但默认值为 0 需要自己进行设定。 变更值的参数 (6) 1. master-retry-count master_retry_count 参数用于设定复制连接超时后重试连接的最大次数。 在 8.2.0 默认值为 10 而 8.0.35 的默认值为 86400 这一变更是从 8.1.0 开始的。 需要注意的是创建复制的语法 change master to 已经废弃改为 change replication source to。 2. optimizer-switch (hash_set_operationson) 从 8.2.0 开始 optimizer_switch 中新增了一个控制标记 hash_set_operations默认值为 on。 用于对集合操作(包括 EXCEPT 和 INTERSECT)进行哈希表优化这种优化用于哈希的内存量可以使用 set_operations_buffer_size 系统变量来控制。 系统变量 set_operations_buffer_size 是 MySQL 8.2.0 新引入的下面会再介绍。 3. performance-schema-error-size performance_schema_error_size 表示数据库错误码的数量在 MySQL 8.0.35 中默认值为 5307 而在 MySQL 8.2.0 中变更为 5377 。 mysql SELECT version(),count(*) FROM performance_schema.events_errors_summary_global_by_error;---------------------| version() | count(*) |---------------------| 8.2.0 | 5377 |---------------------1 row in set (0.00 sec) 源码中的定义如下 static Sys_var_long Sys_pfs_error_size( performance_schema_error_size, Number of server errors instrumented., READ_ONLY GLOBAL_VAR(pfs_param.m_error_sizing), CMD_LINE(REQUIRED_ARG), VALID_RANGE(0, 1024 * 1024), DEFAULT(PFS_MAX_GLOBAL_SERVER_ERRORS), BLOCK_SIZE(1), PFS_TRAILING_PROPERTIES); 4. performance-schema-max-memory-classes performance_schema_max_memory_classes 是全局只读参数表示 memory instruments 的最大数量。 在 MySQL 8.0.35 中默认值为 450 但在 MySQL 8.2.0 中变为 470 不过官方文档尚未更新。 已在 MySQL Bugs 网站提交相关 bug https://bugs.mysql.com/bug.php?id112839 5. performance-schema-max-rwlock-classes performance_schema_max_rwlock_classes 是全局只读参数表示 rwlock instruments 的最大数量。 在 MySQL 8.0.35 中默认值为 60 但在 MySQL 8.2.0 中变为 100 。 6. performance-schema-max-statement-classes performance_schema_max_statement_classes 是全局只读参数表示 statement instruments 的最大数量。 默认值是在服务器构建时根据客户机/服务器协议中的命令数量和服务器支持的SQL语句类型数量计算的。 在 MySQL 8.0.35 中默认值为 219 而在 MySQL 8.2.0 中变为 220 。 那么多的1个是从哪来的呢 从相关代码提交记录可以看到描述 https://github.com/mysql/mysql-server/commit/eb7dd6c6c10c0437658caa7b9c7716c0468582fa WL#15426: Implement SHOW PARSE_TREE ❝ Implemented a SHOW PARSE_TREE statement in debug builds to display the JSON-formatted parse tree for a SELECT statement. This statement is not supported in release builds, and is available only in debug builds, or by compiling the server using -DWITH_SHOW_PARSE_TREE. (WL #15426) 从 MySQL 8.1.0 开始引入新 SQL 语句 show parse_tree 用来调试 select 语句并以 json 格式展示。 需要注意的是该参数只能用于 Debug 模式所以官方下载的正式安装包是无法使用该语法的否则会报语法错误。 mysql SHOW PARSE_TREE select 1;ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near PARSE_TREE select 1 at line 1 新增的参数 (7) 1. mysql-native-password MySQL 中创建用户时默认的密码插件已经变更为 caching_sha2_password但目前仍然支持使用 mysql_native_password该参数就是控制服务器启动时是否启用该密码插件。 在 8.1.0 的发版说明中有如下一段描述 https://dev.mysql.com/doc/relnotes/mysql/8.1/en/news-8-1-0.html ❝ The mysql_native_password authentication plugin now is deprecated and subject to removal in a future version of MySQL. CREATE USER, ALTER USER, and SET PASSWORD operations now insert a deprecation warning into the server error log if an account attempts to authenticate using mysql_native_password as an authentication method. (Bug #35336317) 具体演示如下 mysql create user shawnyan identified with mysql_native_password by 1;Query OK, 0 rows affected (0.00 sec) 日志中会提示该插件已弃用请用 caching_sha2_password 代替。 2023-10-26T09:04:32.364529Z 12 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: mysql_native_password is deprecated and will be removed in a future release. Please use caching_sha2_password instead2. ndb-mgm-tls 启动选项 ndb-mgm-tls/ndb-tls-search-path 是 MySQL 8.2.0 新引入的为 NDB 引擎增加 TLS 相关选项。 但由于文档中暂无相关参数描述而且官网公开的 worklog 不再更新所以无法查阅到具体的功能描述仅能通过社区版的代码提交记录窥视一二。 WL#15524 post-push fixes (2nd set)
WL#15524 post-push fixes
WL#15524 Patch #17 Run more existing MTR tests with TLS
WL#15524 Patch #16 Use TLS for Event Listener
WL#15524 Patch #15 Visbility
WL#15524 Patch #14 Add MGM TLS support to all remaining tools
WL#15524 patch #13 ndb_waiter and new MTR tests
WL#15524 Patch #12 MGM TLS in API Nodes, mysqld, and Cluster/J
WL#15524 Patch #11 Use MGM TLS in TransporterRegistry and MgmtSrvr
WL#15524 Patches #9 and #10: --ndb-mgm-tls in ndbd and ndb_mgmd
WL#15524 Patch #8 TLS options in ndb_mgm
WL#15524 Patch #7 Add --ndb-mgm-tls option to ndb_sign_keys
WL#15524 Patch #6 Command authorization in MGM client
WL#15524 Patch #5 Command authorization in MGM server
WL#15524 Patch #4 MGM TLS Configuration
WL#15524 Patch #3 Use TLS for upgraded transporter
WL#15524 Patch #2 TLS-safe upgrade of mgm socket to transporter
WL#15524 Patch #1 START TLS for management API以及从源码中可以看到这个选项提供了三个选项值分别是 relaxed,strict,deferred默认值为 relaxed。 /* ndb_mgm uses an extended form of the --ndb-mgm-tls enum, which accepts an extra option, disabled*/static const char * tls_names[] { relaxed, strict, deferred, nullptr }; 3. ndb-tls-search-path 用于存放 NDB 集群 TLS 私钥的目录。 具体内容同上。 4. performance-schema-max-meter-classes performance_schema_max_meter_classes 是全局只读系统变量从 MySQL 8.2.0 开始引入表示 meter instruments 可被创建的最大数量。 5. performance-schema-max-metric-classes performance_schema_max_metric_classes 是全局只读系统变量从 MySQL 8.2.0 开始引入表示 metric instruments 可被创建的最大数量。 performance_schema_max_meter_classes / performance_schema_max_metric_classes 这两个变量是一个 worklog 里增加的用于服务器的遥测指标接口。 另外命令很相似一个是 meter另一个是 metric需要注意区分。 6. set-operations-buffer-size set_operations_buffer_size 可以动态调整默认值为 256K最大可以调整到 1GB从 MySQL 8.2.0 开始引入。 在上面的 optimizer-switch (hash_set_operationson) 部分已经介绍过。 相关文档参见 https://dev.mysql.com/doc/refman/8.2/en/server-system-variables.html#sysvar_set_operations_buffer_size 7. tls-certificates-enforced-validation tls_certificates_enforced_validation 表示在数据库启动时强制校验 SSL 证书是否有效如果设定为 TRUE 那么数据库在发现无效证书时将停止启动其默认值为 OFF。 总结 MySQL 8.2.0 启动选项和系统变量的变化多达 16 项还有很多系统状态变量文本没有列举。 MySQL 8.2.0 是 MySQL 变更发版模型后的第二个版本是创新版本 (Innovation Release)不建议部署到生产环境。 更多精彩 [MySQL] 再见 mysql_upgrade MySQL 8.1.0 已来 从鸟山明到 MySQL 5.7 EOL MySQL Server 8.3.0 重要变更解析 MySQL 数据库认证考试介绍2024 版 如何选择适合的 MySQL Connector/J 版本 MySQL 8.4.0 LTS 发布 (MySQL 第一个长期支持版本) MySQL 8.4.0 LTS 变更解析InnoDB 参数默认值变化 MySQL 8.4.0 LTS 变更解析MySQL 的复制与组复制 MySQL 8.4.0 LTS 变更解析I_S 表、权限、关键字和客户端 MySQL 8.4.0 LTS 变更解析源码编译类库变更和密码插件 [Oracle] Oracle 数据库全面升级为 23ai python-oracledb 已率先支持 Oracle 23ai 一文带你了解 Oracle 23ai 新特性 Vector 的基础用法 SOP for Oracle 23aiPython 连接 Oracle 的两种方法 -- / END / -- 如果这篇文章为你带来了灵感或启发就请帮忙点『赞』or『在看』or『转发』吧感谢(๑˃̵ᴗ˂̵) 本文由 mdnice 多平台发布