[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

相关文章

Python 基于http.server模块实现简单http服务的代码举例

《Python基于http.server模块实现简单http服务的代码举例》Pythonhttp.server模块通过继承BaseHTTPRequestHandler处理HTTP请求,使用Threa... 目录测试环境代码实现相关介绍模块简介类及相关函数简介参考链接测试环境win11专业版python

解决Nginx启动报错Job for nginx.service failed because the control process exited with error code问题

《解决Nginx启动报错Jobfornginx.servicefailedbecausethecontrolprocessexitedwitherrorcode问题》Nginx启... 目录一、报错如下二、解决原因三、解决方式总结一、报错如下Job for nginx.service failed bec

SQL Server 查询数据库及数据文件大小的方法

《SQLServer查询数据库及数据文件大小的方法》文章介绍了查询数据库大小的SQL方法及存储过程实现,涵盖当前数据库、所有数据库的总大小及文件明细,本文结合实例代码给大家介绍的非常详细,感兴趣的... 目录1. 直接使用SQL1.1 查询当前数据库大小1.2 查询所有数据库的大小1.3 查询每个数据库的详

Spring Boot 整合 SSE(Server-Sent Events)实战案例(全网最全)

《SpringBoot整合SSE(Server-SentEvents)实战案例(全网最全)》本文通过实战案例讲解SpringBoot整合SSE技术,涵盖实现原理、代码配置、异常处理及前端交互,... 目录Spring Boot 整合 SSE(Server-Sent Events)1、简述SSE与其他技术的对

解决Failed to get nested archive for entry BOOT-INF/lib/xxx.jar问题

《解决FailedtogetnestedarchiveforentryBOOT-INF/lib/xxx.jar问题》解决BOOT-INF/lib/xxx.jar替换异常需确保路径正确:解... 目录Failed to get nested archive for entry BOOT-INF/lib/xxx

SQL Server跟踪自动统计信息更新实战指南

《SQLServer跟踪自动统计信息更新实战指南》本文详解SQLServer自动统计信息更新的跟踪方法,推荐使用扩展事件实时捕获更新操作及详细信息,同时结合系统视图快速检查统计信息状态,重点强调修... 目录SQL Server 如何跟踪自动统计信息更新:深入解析与实战指南 核心跟踪方法1️⃣ 利用系统目录

SQL Server 中的 WITH (NOLOCK) 示例详解

《SQLServer中的WITH(NOLOCK)示例详解》SQLServer中的WITH(NOLOCK)是一种表提示,等同于READUNCOMMITTED隔离级别,允许查询在不获取共享锁的情... 目录SQL Server 中的 WITH (NOLOCK) 详解一、WITH (NOLOCK) 的本质二、工作

SQL Server安装时候没有中文选项的解决方法

《SQLServer安装时候没有中文选项的解决方法》用户安装SQLServer时界面全英文,无中文选项,通过修改安装设置中的国家或地区为中文中国,重启安装程序后界面恢复中文,解决了问题,对SQLSe... 你是不是在安装SQL Server时候发现安装界面和别人不同,并且无论如何都没有中文选项?这个问题也

SQL server数据库如何下载和安装

《SQLserver数据库如何下载和安装》本文指导如何下载安装SQLServer2022评估版及SSMS工具,涵盖安装配置、连接字符串设置、C#连接数据库方法和安全注意事项,如混合验证、参数化查... 目录第一步:打开官网下载对应文件第二步:程序安装配置第三部:安装工具SQL Server Manageme

C#连接SQL server数据库命令的基本步骤

《C#连接SQLserver数据库命令的基本步骤》文章讲解了连接SQLServer数据库的步骤,包括引入命名空间、构建连接字符串、使用SqlConnection和SqlCommand执行SQL操作,... 目录建议配合使用:如何下载和安装SQL server数据库-CSDN博客1. 引入必要的命名空间2.