问题的由来
MySQL服务没有正常关机,是电脑没电后自动关机产生,记录一下排查过程
1.本以为是pid的问题,上网找了教程,解决不了,然后看日志
看了网上各种说是数据库内存溢出
2021-03-12T10:41:18.317167Z 0 [Note] Binlog end
2021-03-12T10:41:18.317217Z 0 [Note] Shutting down plugin 'CSV'
2021-03-12T10:41:18.317389Z 0 [Note] /usr/sbin/mysqld: Shutdown complete 2021-03-12T10:41:18.671273Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-03-12T10:41:18.672016Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.33-0ubuntu0.18.04.1) starting as process 2125 ...
2021-03-12T10:41:18.675569Z 0 [Note] InnoDB: PUNCH HOLE support available
2021-03-12T10:41:18.675608Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-03-12T10:41:18.675611Z 0 [Note] InnoDB: Uses event mutexes
2021-03-12T10:41:18.675614Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2021-03-12T10:41:18.675617Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-03-12T10:41:18.675619Z 0 [Note] InnoDB: Using Linux native AIO
2021-03-12T10:41:18.675770Z 0 [Note] InnoDB: Number of pools: 1
2021-03-12T10:41:18.675820Z 0 [Note] InnoDB: Using CPU crc32 instructions
2021-03-12T10:41:18.677170Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-03-12T10:41:18.684020Z 0 [Note] InnoDB: Completed initialization of buffer pool
2021-03-12T10:41:18.685248Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-03-12T10:41:18.699329Z 0 [ERROR] InnoDB: Only one log file found.
2021-03-12T10:41:18.699360Z 0 [ERROR] InnoDB: Plugin initialization aborted with error not found
2021-03-12T10:41:19.310191Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-03-12T10:41:19.310270Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-03-12T10:41:19.310284Z 0 [ERROR] Failed to initialize builtin plugins.
2021-03-12T10:41:19.310290Z 0 [ERROR] Aborting 2021-03-12T10:41:19.310340Z 0 [Note] Binlog end
2021-03-12T10:41:19.310422Z 0 [Note] Shutting down plugin 'CSV'
2021-03-12T10:41:19.310978Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
2.排查日志后发现,因为/var/lib/ib_logfile中记录者innoDB一些引擎的信息,在server未正常关闭的情况下,重启后的server不支持innodb的引擎,删除记录innodb的配置文件,

rm -rf ./ib_logfile*
重启mysql,启动正常
systemctl start mysqld
Failed to start mysqld.service: Unit mysqld.service not found.
root@mysql-master:/var/lib/mysql# systemctl start mysqld
Failed to start mysqld.service: Unit mysqld.service not found.
root@mysql-master:/var/lib/mysql# systemctl start mysql
root@mysql-master:/var/lib/mysql# systemctl status mysql
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-03-12 18:44:30 CST; 5s ago
Process: 2199 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited,
Process: 2175 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 2201 (mysqld)
Tasks: 27 (limit: 2290)
CGroup: /system.slice/mysql.service
└─2201 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid Mar 12 18:44:28 mysql-master systemd[1]: Starting MySQL Community Server...
Mar 12 18:44:30 mysql-master systemd[1]: Started MySQL Community Server.
查看MySQL的端口3306
ss -tnl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 0.0.0.0:111 0.0.0.0:*
LISTEN 0 128 127.0.0.53%lo:53 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 127.0.0.1:6010 0.0.0.0:*
LISTEN 0 128 0.0.0.0:37211 0.0.0.0:*
LISTEN 0 64 0.0.0.0:2049 0.0.0.0:*
LISTEN 0 128 0.0.0.0:47459 0.0.0.0:*
LISTEN 0 64 0.0.0.0:43461 0.0.0.0:*
LISTEN 0 128 0.0.0.0:50475 0.0.0.0:*
LISTEN 0 64 [::]:37039 [::]:*
LISTEN 0 128 [::]:111 [::]:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 128 [::]:38455 [::]:*
LISTEN 0 128 [::1]:6010 [::]:*
LISTEN 0 64 [::]:2049 [::]:*
LISTEN 0 128 [::]:52773 [::]:*
LISTEN 0 128 [::]:37129 [::]:*
LISTEN 0 80 *:3306 *:* mysql的端口ok,正常访问数据库没有问题

解决报错ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code的更多相关文章

  1. mysql报错:/usr/sbin/mysqld:unknown variable 'default-character-set=utf8'

    修改mysql的字符集时,为了将默认字符集设置为utf-8,便将/etc/my.cnf下[mysqld]加了一行 default-character-set=utf8, 但是在下次启动系统的时候,my ...

  2. PID file /run/zabbix/zabbix_server.pid not readable (yet?) after start. 报错解决

    报错如下: [root@localhost zabbix]# systemctl start zabbix-server Job for zabbix-server.service failed be ...

  3. 报错:/usr/sbin/mysqld: Can't find file: './performance_schema/events_waits_summary_by_account_by_event_name.frm' (errno: 13 - Permission denied)

    报错背景: Linux环境下安装MySQL数据库. 安装完成,数据库初始化,启动数据库时报错. 报错现象: -- :: [ERROR] Native table 'performance_schema ...

  4. python ConfigParser读取配置文件,及解决报错(去掉BOM)ConfigParser.MissingSectionHeaderError: File contains no section headers的方法

    先说一下在读取配置文件时报错的问题--ConfigParser.MissingSectionHeaderError: File contains no section headers 问题描述: 在练 ...

  5. svn报错cleanup failed–previous operation has not finished; run cleanup if it was interrupted的解决办法

    今天在svn提交的时候它卡顿了一下,我以为已经提交完了,就按了一下,结果就再也恢复不了,也继续不了了... 报错 cleanup failed–previous operation has not f ...

  6. 解决FPDF报错:FPDF error: Not a JPEG file / FPDF error: Not a PNG file

    最近有个项目需要用到FPDF,但是输出的时候报错: FPDF error: Not a JPEG file: http://***/data/attachment/forum/201603/19/10 ...

  7. 解决Undefined symbols for architecture x86_64: 报错 和 ld: warning: ld: warning: ignoring file警告

    出现这种错误的情况: 用iphone5模拟器编译程序正常, 用iphone5s以上的模拟器编译出现Undefined symbols for architecture x86_64: 报错 和 ld: ...

  8. vue 解决报错1

    [Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available ...

  9. centOS7 vsftp ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS) 启动失败问题?

    [root@localhost c]# systemctl status vsftpd.service ● vsftpd.service - Vsftpd ftp daemon Loaded: loa ...

随机推荐

  1. 实验:Python图形图像处理

    1. 准备一张照片,编写Python程序将该照片进行图像处理,分别输出以下效果的图片:(a)灰度图:(b)轮廓图: (c)变换RGB通道图:(d)旋转45度图. 2. 假设当前文件夹中data.csv ...

  2. 有关状压DP

    [以下内容仅为本人在学习中的所感所想,本人水平有限目前尚处学习阶段,如有错误及不妥之处还请各位大佬指正,请谅解,谢谢!] 引言 动态规划虽然已经是对暴力算法的优化,但在某些比较特别的情况下,可以通过一 ...

  3. 使用VLL技术实现多家合作伙伴复用同一条链路做两端数据全透传

    公司A当前租用一条10G跨市运营商光缆,自身业务只用到一半流量,为节省成本,寻求多家合作伙伴共用链路以达到财务需求 合作伙伴需求接入链路全透传,即光缆两端接入点端口逻辑直连 当前有三种方案可以实现上述 ...

  4. Spring Security之简单举例

    核心功能 Spring Security提供了三个核心的功能: 认证(你是谁) 授权(你能干什么) 攻击防护(防止伪造身份) 一个简单例子 默认情况 在前面的开发中,都是将spring securit ...

  5. 128_Power BI父级排名TOPN子级动态展示

    博客:www.jiaopengzi.com 焦棚子的文章目录 请点击下载附件 一.背景 前些天在和朋友交流Power BI中有这样一个需求,按照父级排名后,需要显示出父级TOPN的子级明细. 如下&l ...

  6. [C++STL] 队列 queue 的入门

    队列结构 概念: 队列(queue):和栈相似,也是一种特殊的线性表.和栈不同的是,队列只允许在表的一端进行插入操作,而在另一端进行删除操作.一般来说,进行插入操作的一端称为队尾,进行删除操作的一端称 ...

  7. 01C语言基础(二)

    Day07 笔记 指针和函数: 栈 帧: 当函数调用时,系统会在 stack 空间上申请一块内存区域,用来供函数调用,主要存放 形参 和 局部变量(定义在函数内部). 当函数调用结束,这块内存区域自动 ...

  8. 「NOI2019」序列

    NKOJ卡常卡不过QAQ description 给两个A,B序列,让你分别在A,B中各选k个数,其中至少有L对下标相等. Solution 把问题转化为至多选n-K对下标不同的对. 配对问题就用费用 ...

  9. Java概论——JavaSE基础

    Java概论 Java特性和优势 简单性 面向对象 可移植性 高性能:即时编译 分布式:可处理TCP/IP协议的一些东西 动态性:通过反射机制使其具有动态性 多线程:良好的交互性和实时性 安全性:防病 ...

  10. 「Java分享客栈」Nacos配置中心称王称霸,我Apollo一生也不弱于人!

    前言 Apollo又称阿波罗配置中心,在前两年还是挺火的,但阿里SpringCloud套件席卷国内之后,nacos就成为了最被亲睐的分布式配置中心,nacos是配置中心和注册中心二合一的产品,单纯功能 ...