[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

相关文章

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 安

解决SpringBoot启动报错:Failed to load property source from location 'classpath:/application.yml'

《解决SpringBoot启动报错:Failedtoloadpropertysourcefromlocationclasspath:/application.yml问题》这篇文章主要介绍... 目录在启动SpringBoot项目时报如下错误原因可能是1.yml中语法错误2.yml文件格式是GBK总结在启动S

python连接本地SQL server详细图文教程

《python连接本地SQLserver详细图文教程》在数据分析领域,经常需要从数据库中获取数据进行分析和处理,下面:本文主要介绍python连接本地SQLserver的相关资料,文中通过代码... 目录一.设置本地账号1.新建用户2.开启双重验证3,开启TCP/IP本地服务二js.python连接实例1.

mysql出现ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost‘ (10061)的解决方法

《mysql出现ERROR2003(HY000):Can‘tconnecttoMySQLserveron‘localhost‘(10061)的解决方法》本文主要介绍了mysql出现... 目录前言:第一步:第二步:第三步:总结:前言:当你想通过命令窗口想打开mysql时候发现提http://www.cpp

SQL Server清除日志文件ERRORLOG和删除tempdb.mdf

《SQLServer清除日志文件ERRORLOG和删除tempdb.mdf》数据库再使用一段时间后,日志文件会增大,特别是在磁盘容量不足的情况下,更是需要缩减,以下为缩减方法:如果可以停止SQLSe... 目录缩减 ERRORLOG 文件(停止服务后)停止 SQL Server 服务:找到错误日志文件:删除

Windows Server服务器上配置FileZilla后,FTP连接不上?

《WindowsServer服务器上配置FileZilla后,FTP连接不上?》WindowsServer服务器上配置FileZilla后,FTP连接错误和操作超时的问题,应该如何解决?首先,通过... 目录在Windohttp://www.chinasem.cnws防火墙开启的情况下,遇到的错误如下:无法与

一文详解SQL Server如何跟踪自动统计信息更新

《一文详解SQLServer如何跟踪自动统计信息更新》SQLServer数据库中,我们都清楚统计信息对于优化器来说非常重要,所以本文就来和大家简单聊一聊SQLServer如何跟踪自动统计信息更新吧... SQL Server数据库中,我们都清楚统计信息对于优化器来说非常重要。一般情况下,我们会开启"自动更新

JAVA虚拟机中 -D, -X, -XX ,-server参数使用

《JAVA虚拟机中-D,-X,-XX,-server参数使用》本文主要介绍了JAVA虚拟机中-D,-X,-XX,-server参数使用,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有... 目录一、-D参数二、-X参数三、-XX参数总结:在Java开发过程中,对Java虚拟机(JVM)的启动参数进

Windows server服务器使用blat命令行发送邮件

《Windowsserver服务器使用blat命令行发送邮件》在linux平台的命令行下可以使用mail命令来发送邮件,windows平台没有内置的命令,但可以使用开源的blat,其官方主页为ht... 目录下载blatBAT命令行示例备注总结在linux平台的命令行下可以使用mail命令来发送邮件,Win