[ERROR] [MY-011268] 、[ERROR] [MY-010175][Server] Configuring persisted options failed

2024-05-10 06:08

本文主要是介绍[ERROR] [MY-011268] 、[ERROR] [MY-010175][Server] Configuring persisted options failed,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

  持久化修改log_error_services='log_filter_internal; log_sink_internal; log_sink_json’之后,卸载了"log_sink_json"组件,重启MySQL报错:

[root@chengyu ~]# systemctl start mysqld8
Job for mysqld8.service failed because the control process exited with error code. See "systemctl status mysqld8.service" and "journalctl -xe" for details.
[root@chengyu ~]# systemctl status mysqld8
● mysqld8.service - LSB: start and stop MySQLLoaded: loaded (/etc/rc.d/init.d/mysqld8; bad; vendor preset: disabled)Active: failed (Result: exit-code) since Mon 2020-07-27 15:02:59 CST; 17s agoDocs: man:systemd-sysv-generator(8)Process: 7728 ExecStop=/etc/rc.d/init.d/mysqld8 stop (code=exited, status=0/SUCCESS)Process: 8000 ExecStart=/etc/rc.d/init.d/mysqld8 start (code=exited, status=1/FAILURE)Tasks: 20CGroup: /system.slice/mysqld8.service├─1738 /bin/sh /usr/local/mysql8/bin/mysqld_safe --datadir=/home/mysql8/data --pid-file=/...└─8566 /usr/local/mysql8/bin/mysqld --basedir=/usr/local/mysql8 --datadir=/home/mysql8/da...Jul 27 15:02:58 chengyu systemd[1]: Starting LSB: start and stop MySQL...
Jul 27 15:02:59 chengyu mysqld8[1702]: 2020-07-27T07:02:59.774859Z mysqld_safe mysqld process ha...lled
Jul 27 15:02:59 chengyu mysqld8[8000]: Starting MySQL./usr/local/mysql8/bin/mysqld_safe: line 199:  ...
Jul 27 15:02:59 chengyu mysqld8[8000]: ERROR! The server quit without updating PID file (/usr/lo...id).
Jul 27 15:02:59 chengyu systemd[1]: mysqld8.service: control process exited, code=exited status=1
Jul 27 15:02:59 chengyu systemd[1]: Failed to start LSB: start and stop MySQL.
Jul 27 15:02:59 chengyu systemd[1]: Unit mysqld8.service entered failed state.
Jul 27 15:02:59 chengyu systemd[1]: mysqld8.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

  打开错误日志看一看:[root@chengyu ~]# vim /home/mysql8/data/chengyu.err

  2020-07-27T07:07:18.020099Z 6 [ERROR] [MY-011268] [Server] Configuring persisted options failed: “Variable ‘log_error_services’ can’t be set to the value of ‘log_filter_internal; log_sink_internal; log_sink_json’”.
2020-07-27T07:07:18.020561Z 6 [Warning] [MY-013140] [Server] Error in diagnostics area: MY-003701 - Value for log_error_services got confusing at or around “log_sink_json”. Syntax may be wrong, component may not be INSTALLed, or a component that does not support instances may be listed more than once.
2020-07-27T07:07:18.021035Z 0 [ERROR] [MY-010175] [Server] Setting persistent options failed.

  原因在MySQL 8之前的版本中,修改全局变量只会影响其内存值,而不会持久化到配置文件中,重启数据库就会失效;但是从MySQL 8开始,通过SET PERSIST命令修改的全局变量会持久化到具体的配置文件中,也就是mysqld-auto.cnf文件中,即便你在my.cnf还是修改前的值,依然会在启动的时候以mysqld-auto.cnf文件的修改值为准。

  之前我使用“SET PERSIST log_error_services = ‘log_filter_internal; log_sink_internal; log_sink_json’;”持久化了log_error_services变量,该变量就写入MySQL数据目录的mysqld-auto.cnf中 ,MySQL数据库启动时,先读取默认配置文件my.cnf,再读取mysqld-auto.cnf文件,所以,即便我在my.cnf中配置了 log_error_services = ‘log_filter_internal; log_sink_internal’,mysqld-auto.cnf中的log_error_services 依然会被再次读取,重启也还报如上ERROR。

  解决:修改mysqld-auto.cnf中的log_error_services值,这里根据ERROR提示删除掉log_sink_json即可:

  [root@chengyu ~]# vim /home/mysql8/data/mysqld-auto.cnf

  修改前:

{ "Version" : 1 , "mysql_server" : { "log_error_services" : { "Value" : "log_filter_internal;log_sink_internal; log_sink_json" , "Metadata" : { "Timestamp" : 1595486647764821 , "User" : "root" , "Host" : "localhost" } } } }

  修改后:

{ "Version" : 1 , "mysql_server" : { "log_error_services" : { "Value" : "log_filter_internal;log_sink_internal" , "Metadata" : { "Timestamp" : 1595486647764821 , "User" : "root" , "Host" : "localhost" } } } }

  重启OK:

[root@chengyu ~]# systemctl start mysqld8
[root@chengyu ~]# systemctl start mysqld8
[root@chengyu ~]# systemctl status mysqld8
● mysqld8.service - LSB: start and stop MySQLLoaded: loaded (/etc/rc.d/init.d/mysqld8; bad; vendor preset: disabled)Active: active (running) since Tue 2020-07-28 10:36:20 CST; 4s agoDocs: man:systemd-sysv-generator(8)Process: 16612 ExecStop=/etc/rc.d/init.d/mysqld8 stop (code=exited, status=0/SUCCESS)Process: 16288 ExecStart=/etc/rc.d/init.d/mysqld8 start (code=exited, status=0/SUCCESS)Tasks: 40CGroup: /system.slice/mysqld8.service├─16310 /bin/sh /usr/local/mysql8/bin/mysqld_safe --datadir=/home/mysql8/data --pid-file=...└─16649 /usr/local/mysql8/bin/mysqld --basedir=/usr/local/mysql8 --datadir=/home/mysql8/d...Jul 28 10:36:18 chengyu systemd[1]: Starting LSB: start and stop MySQL...
Jul 28 10:36:20 chengyu mysqld8[16288]: Starting MySQL.. SUCCESS!
Jul 28 10:36:20 chengyu systemd[1]: Started LSB: start and stop MySQL.[root@chengyu ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.20 Source distributionCopyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.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> SELECT @@GLOBAL.log_error_services;
+----------------------------------------+
| @@GLOBAL.log_error_services            |
+----------------------------------------+
| log_filter_internal; log_sink_internal |
+----------------------------------------+
1 row in set (0.00 sec)

2020年7月27日

  阳台上的茉莉花开了,娇小、圣洁、淡雅,清香怡人。

  即便在这酷热黏腻的气温下,它那周身的清冽也毫不示弱的张扬着它不可亵渎的性冷淡气质。

这篇关于[ERROR] [MY-011268] 、[ERROR] [MY-010175][Server] Configuring persisted options failed的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/975646

相关文章

SQL Server修改数据库名及物理数据文件名操作步骤

《SQLServer修改数据库名及物理数据文件名操作步骤》在SQLServer中重命名数据库是一个常见的操作,但需要确保用户具有足够的权限来执行此操作,:本文主要介绍SQLServer修改数据... 目录一、背景介绍二、操作步骤2.1 设置为单用户模式(断开连接)2.2 修改数据库名称2.3 查找逻辑文件名

SQL Server数据库死锁处理超详细攻略

《SQLServer数据库死锁处理超详细攻略》SQLServer作为主流数据库管理系统,在高并发场景下可能面临死锁问题,影响系统性能和稳定性,这篇文章主要给大家介绍了关于SQLServer数据库死... 目录一、引言二、查询 Sqlserver 中造成死锁的 SPID三、用内置函数查询执行信息1. sp_w

Linux中修改Apache HTTP Server(httpd)默认端口的完整指南

《Linux中修改ApacheHTTPServer(httpd)默认端口的完整指南》ApacheHTTPServer(简称httpd)是Linux系统中最常用的Web服务器之一,本文将详细介绍如何... 目录一、修改 httpd 默认端口的步骤1. 查找 httpd 配置文件路径2. 编辑配置文件3. 保存

Windows Server 2025 搭建NPS-Radius服务器的步骤

《WindowsServer2025搭建NPS-Radius服务器的步骤》本文主要介绍了通过微软的NPS角色实现一个Radius服务器,身份验证和证书使用微软ADCS、ADDS,具有一定的参考价... 目录简介示意图什么是 802.1X?核心作用802.1X的组成角色工作流程简述802.1X常见应用802.

SQL Server身份验证模式步骤和示例代码

《SQLServer身份验证模式步骤和示例代码》SQLServer是一个广泛使用的关系数据库管理系统,通常使用两种身份验证模式:Windows身份验证和SQLServer身份验证,本文将详细介绍身份... 目录身份验证方式的概念更改身份验证方式的步骤方法一:使用SQL Server Management S

Spring AI 实现 STDIO和SSE MCP Server的过程详解

《SpringAI实现STDIO和SSEMCPServer的过程详解》STDIO方式是基于进程间通信,MCPClient和MCPServer运行在同一主机,主要用于本地集成、命令行工具等场景... 目录Spring AI 实现 STDIO和SSE MCP Server1.新建Spring Boot项目2.a

SQL Server中的PIVOT与UNPIVOT用法具体示例详解

《SQLServer中的PIVOT与UNPIVOT用法具体示例详解》这篇文章主要给大家介绍了关于SQLServer中的PIVOT与UNPIVOT用法的具体示例,SQLServer中PIVOT和U... 目录引言一、PIVOT:将行转换为列核心作用语法结构实战示例二、UNPIVOT:将列编程转换为行核心作用语

解决Maven项目报错:failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0的问题

《解决Maven项目报错:failedtoexecutegoalorg.apache.maven.plugins:maven-compiler-plugin:3.13.0的问题》这篇文章主要介... 目录Maven项目报错:failed to execute goal org.apache.maven.pl

Spring Boot 整合 SSE的高级实践(Server-Sent Events)

《SpringBoot整合SSE的高级实践(Server-SentEvents)》SSE(Server-SentEvents)是一种基于HTTP协议的单向通信机制,允许服务器向浏览器持续发送实... 目录1、简述2、Spring Boot 中的SSE实现2.1 添加依赖2.2 实现后端接口2.3 配置超时时

SQL server配置管理器找不到如何打开它

《SQLserver配置管理器找不到如何打开它》最近遇到了SQLserver配置管理器打不开的问题,尝试在开始菜单栏搜SQLServerManager无果,于是将自己找到的方法总结分享给大家,对SQ... 目录方法一:桌面图标进入方法二:运行窗口进入方法三:查找文件路径方法四:检查 SQL Server 安