当前位置: 首页 > news >正文

Linux随记(三十)

一、ambari 的 主机界面无法 “启动/停止/重启”所有组件 restart all componnents,呈禁用 灰色图标状态。


处理方法: 重启ambari-agent

#第一次重启报错ambari-agent restartecho$?cat/var/log/ambari-agent/ambari-agent.outnetstat-naltp|grep8670ps-ef|grep82051#/usr/bin/python2 /usr/lib/ambari-agent/lib/ambari_agent/main.py restart#杀相关进程,然后重启ambari-agentkill-1582051ambari-agent restart ambari-agent status

二、单节点mysql8.0.46启动报错ERROR! The server quit without updating PID file (/data/mysql8/data/mysql.pid)

环境信息:bclinux euler 21.10 。 单节点mysql 8.0.44 需要升级到 8.0.46

#报错内容:[root@xx data]# service mysql restartERROR!MySQL server PIDfilecould not be found!Starting MySQL.Logging to'/data/mysql8/data/error.log'.........ERROR!The server quit without updating PIDfile(/data/mysql8/data/mysql.pid).[root@xx data]# cat /data/mysql8/data/error.log2026-04-28T08:26:43.505248Z0[Warning][MY-010918][Server]'default_authentication_plugin'is deprecated and will be removedina future release. Please use authentication_policy instead.2026-04-28T08:26:43.505322Z0[System][MY-010116][Server]/usr/local/mysql8/bin/mysqld(mysqld8.0.46)starting as process2333352026-04-28T08:26:43.510245Z0[Warning][MY-013242][Server]--character-set-server:'utf8'is currently analiasforthe charactersetUTF8MB3, but will be analiasforUTF8MB4ina future release. Please consider using UTF8MB4inorder to be unambiguous.2026-04-28T08:26:43.522394Z0[Warning][MY-013907][InnoDB]Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to computeinnodb_redo_log_capacity=1073741824. Please use innodb_redo_log_capacity instead.2026-04-28T08:26:43.526947Z1[System][MY-013576][InnoDB]InnoDB initialization has started.2026-04-28T08:26:47.961943Z1[System][MY-013577][InnoDB]InnoDB initialization has ended. mysqld: File'/var/log/mysql/slow.log'not found(OS errno2- No suchfileor directory)2026-04-28T08:26:48.464211Z0[ERROR][MY-011263][Server]Could not use /var/log/mysql/slow.logforlogging(error2- No suchfileor directory). Turning logging offforthe server process. To turn it on again: fix the cause,theneither restart the query logging by using"SET GLOBAL SLOW_QUERY_LOG=ON"or restart the MySQL server.2026-04-28T08:26:48.661507Z0[Warning][MY-010068][Server]CA certificate ca.pem is self signed.2026-04-28T08:26:48.661591Z0[System][MY-013602][Server]Channel mysql_main configured to support TLS. Encrypted connections are now supportedforthis channel.2026-04-28T08:26:48.672853Z0[Warning][MY-011810][Server]Insecure configurationfor--pid-file: Location'/data'inthe path is accessible to all OS users. Consider choosing a different directory.2026-04-28T08:26:48.677931Z0[ERROR][MY-000067][Server]unknown variable'query_cache_type=0'.2026-04-28T08:26:48.678075Z0[ERROR][MY-010119][Server]Aborting2026-04-28T08:26:51.389974Z0[System][MY-010910][Server]/usr/local/mysql8/bin/mysqld: Shutdown complete(mysqld8.0.46)MySQL Community Server - GPL.[root@xx data]#
#处理方法:修改my.cnf 添加记录错误日志#202604 addlog-error=/data/mysql8/data/error.log pid-file=/data/mysql8/data/mysql.pid my.cnf注释弃用报错的配置行,再启动即可。#(MySQL5.X)查询缓存设置#query_cache_type=0#query_cache_size=0不过有点奇怪,之前升级到8.0.44的时候,印象是没改动my.cnf ,那时候为啥没报错呢。8.0.46此时就报错无法启动。

操作过程:

#之前的/etc/my.cnf 配置信息:[root@xx data]# vi /etc/my.cnf[mysqld]# 设置3306端口port=3306#配置主服务器log-bin=mysql-bin server-id=1#202604 addlog-error=/data/mysql8/data/error.log pid-file=/data/mysql8/data/mysql.pid# 设置mysql的安装目录basedir=/usr/local/mysql8# 设置mysql数据库的数据存放目录datadir=/data/mysql8/data# 允许最大连接数#max_connections=200# 服务端使用的字符集默认为UTF8character-set-server=utf8# 创建新表时将使用的默认存储引擎default-storage-engine=INNODB# 认证方式(MySQL 8默认使用caching_sha2_password)default_authentication_plugin=mysql_native_password"/etc/my.cnf"56L, 1502C written[root@xx data]#[root@xx data]# service mysql restartERROR!MySQL server PIDfilecould not be found!Starting MySQL.Logging to'/data/mysql8/data/error.log'.........ERROR!The server quit without updating PIDfile(/data/mysql8/data/mysql.pid).[root@xx data]# cat /data/mysql8/data/error.log2026-04-28T08:26:43.505248Z0[Warning][MY-010918][Server]'default_authentication_plugin'is deprecated and will be removedina future release. Please use authentication_policy instead.2026-04-28T08:26:43.505322Z0[System][MY-010116][Server]/usr/local/mysql8/bin/mysqld(mysqld8.0.46)starting as process2333352026-04-28T08:26:43.510245Z0[Warning][MY-013242][Server]--character-set-server:'utf8'is currently analiasforthe charactersetUTF8MB3, but will be analiasforUTF8MB4ina future release. Please consider using UTF8MB4inorder to be unambiguous.2026-04-28T08:26:43.522394Z0[Warning][MY-013907][InnoDB]Deprecated configuration parameters innodb_log_file_size and/or innodb_log_files_in_group have been used to computeinnodb_redo_log_capacity=1073741824. Please use innodb_redo_log_capacity instead.2026-04-28T08:26:43.526947Z1[System][MY-013576][InnoDB]InnoDB initialization has started.2026-04-28T08:26:47.961943Z1[System][MY-013577][InnoDB]InnoDB initialization has ended. mysqld: File'/var/log/mysql/slow.log'not found(OS errno2- No suchfileor directory)2026-04-28T08:26:48.464211Z0[ERROR][MY-011263][Server]Could not use /var/log/mysql/slow.logforlogging(error2- No suchfileor directory). Turning logging offforthe server process. To turn it on again: fix the cause,theneither restart the query logging by using"SET GLOBAL SLOW_QUERY_LOG=ON"or restart the MySQL server.2026-04-28T08:26:48.661507Z0[Warning][MY-010068][Server]CA certificate ca.pem is self signed.2026-04-28T08:26:48.661591Z0[System][MY-013602][Server]Channel mysql_main configured to support TLS. Encrypted connections are now supportedforthis channel.2026-04-28T08:26:48.672853Z0[Warning][MY-011810][Server]Insecure configurationfor--pid-file: Location'/data'inthe path is accessible to all OS users. Consider choosing a different directory.2026-04-28T08:26:48.677931Z0[ERROR][MY-000067][Server]unknown variable'query_cache_type=0'.2026-04-28T08:26:48.678075Z0[ERROR][MY-010119][Server]Aborting2026-04-28T08:26:51.389974Z0[System][MY-010910][Server]/usr/local/mysql8/bin/mysqld: Shutdown complete(mysqld8.0.46)MySQL Community Server - GPL.[root@xx data]#[root@xx data]#[root@xx data]# mkdir -p /var/log/mysql[root@xx data]# chown mysql:mysql /var/log/mysql[root@xx data]# chmod 755 /var/log/mysql[root@xx data]##########根据报错内容 修改/etc/my.cnf[root@xx data]# vi /etc/my.cnf[mysqld]# 设置3306端口port=3306#配置主服务器log-bin=mysql-bin server-id=1#202604 addlog-error=/data/mysql8/data/error.log pid-file=/data/mysql8/data/mysql.pid# 设置mysql的安装目录basedir=/usr/local/mysql8# 设置mysql数据库的数据存放目录datadir=/data/mysql8/data# 允许最大连接数#max_connections=200# 服务端使用的字符集默认为UTF8character-set-server=utf8# 创建新表时将使用的默认存储引擎default-storage-engine=INNODB# 认证方式(MySQL 8默认使用caching_sha2_password)default_authentication_plugin=mysql_native_password#MySql性能调优相关配置示例(/etc/my.cnf)innodb_buffer_pool_size=10G#调整为物理内存的60%-80%innodb_log_file_size=512M#Redo日志文件大小max_connections=600#最大连接tmp_table_size=64M#内存临时表大小max_heap_table_size=64M#MEMORY表最大大小(影响临时表)sort_buffer_size=4M#排序操作缓存innodb_flush_log_at_trx_commit=1#事务提交时刷新日志策略,保留强一致性#(MySQL5.X)查询缓存设置#query_cache_type=0 #0=禁用查询缓存#query_cache_size=0#慢查询日志开启slow_query_log=1long_query_time=2slow_query_log_file=/var/log/mysql/slow.log"/etc/my.cnf"56L, 1504C written[root@xx data]#[root@xx data]# service mysql restartERROR!MySQL server PIDfilecould not be found!Starting MySQL....... SUCCESS![root@xx data]#[root@xx data]# service mysql statusSUCCESS!MySQL running(249273)[root@xx data]#[root@xx data]# ss -naltp | grep mysqlLISTEN070*:33060 *:* users:(("mysqld",pid=249273,fd=20))LISTEN0128*:3306 *:* users:(("mysqld",pid=249273,fd=23))[root@xx data]#[root@xx data]#[root@xx data]# ps -ef | grep mysqlroot2489331016:31 pts/0 00:00:00 /bin/sh /usr/local/mysql8/bin/mysqld_safe--datadir=/data/mysql8/data --pid-file=/data/mysql8/data/mysql.pid mysql249273248933416:31 pts/0 00:00:18 /usr/local/mysql8/bin/mysqld--basedir=/usr/local/mysql8--datadir=/data/mysql8/data --plugin-dir=/usr/local/mysql8/lib/plugin--user=mysql --log-error=/data/mysql8/data/error.log --pid-file=/data/mysql8/data/mysql.pid--port=3306root25426468896016:37 pts/0 00:00:00grep--color=auto mysql[root@xx data]#

END

三、sed修改curl, libcurl的version

http://www.jsqmd.com/news/767878/

相关文章:

  • Windows内核级硬件标识伪装技术实现与隐私保护应用
  • 基于Simulink的储能变流器(PCS)并网预同步与离/并网无缝切换控制​
  • 从零构建智能网页索引系统:内容提取、语义分块与向量检索实战
  • 04-图——从BFS、DFS到拓扑排序
  • Python:Netmiko实现网络设备巡检及配置备份
  • 大厂AI布局启示录:小白也能抓住高薪机遇,一起学大模型!
  • Windows 11/Win10本地磁盘告急?试试用SSHFS把云服务器挂成“无限外挂硬盘”
  • slidev-agent-skill:为AI智能体赋能,自动化创建Slidev演示文稿
  • Armv8-A virtualization 笔记 (一)
  • RepoAgent:基于大语言模型的智能代码仓库分析与自动化文档生成
  • 【逻辑回归从原理到实战:正则化、参数调优与过拟合处理】
  • 网络安全之GRE
  • 基于 Simulink 的数字控制延时补偿与稳定性分析深度实战教程
  • Java调用海康SDK的NET_DVR_STDXMLConfig接口,手把手教你获取设备信息(附完整代码)
  • 迭代器模式是行为型设计模式的一种,其核心思想是提供一种方法顺序访问一个聚合对象中的各个元素
  • 开源三指机械爪OpenClaw:从Arduino控制到ROS集成的完整实现指南
  • 英语全局通用・元音弱读规律
  • 赛博“听诊器”:手把手教你用Windows命令给电脑做体检
  • Promise/A+ 02
  • 【数据库操作全指南:从表创建到高级查询】
  • LyricsX:让Mac音乐体验更完美的智能歌词同步神器 [特殊字符]
  • 服务器重启后 Docker Compose 容器如何自动恢复运行
  • 用立创EDA复刻蓝桥杯省赛真题电路:手把手搭建一个简易电压采集与显示系统(2022模拟题2)
  • DeepSeek-V4-pro 接入 Claude Code 教程
  • 三步轻松备份QQ空间说说历史记录:GetQzonehistory完整指南
  • Docker 27 医疗容器认证实操手册:从镜像签名、SBOM生成到FDA 21 CFR Part 11审计就绪,一步不踩坑
  • 软件评测师基础知识专项刷题:软件工程
  • C语言选择结构自用讲解
  • 03-二叉树——从递归遍历到非递归实现
  • 别再只盯着CAN了!手把手教你用CAN FD收发器搞定汽车ECU的8Mbps高速通信