解决报错ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code
问题的由来
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的更多相关文章
- mysql报错:/usr/sbin/mysqld:unknown variable 'default-character-set=utf8'
		修改mysql的字符集时,为了将默认字符集设置为utf-8,便将/etc/my.cnf下[mysqld]加了一行 default-character-set=utf8, 但是在下次启动系统的时候,my ... 
- 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 ... 
- 报错:/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 ... 
- python ConfigParser读取配置文件,及解决报错(去掉BOM)ConfigParser.MissingSectionHeaderError: File contains no section headers的方法
		先说一下在读取配置文件时报错的问题--ConfigParser.MissingSectionHeaderError: File contains no section headers 问题描述: 在练 ... 
- svn报错cleanup failed–previous operation has not finished; run cleanup if it was interrupted的解决办法
		今天在svn提交的时候它卡顿了一下,我以为已经提交完了,就按了一下,结果就再也恢复不了,也继续不了了... 报错 cleanup failed–previous operation has not f ... 
- 解决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 ... 
- 解决Undefined symbols for architecture x86_64: 报错 和 ld: warning: ld: warning: ignoring file警告
		出现这种错误的情况: 用iphone5模拟器编译程序正常, 用iphone5s以上的模拟器编译出现Undefined symbols for architecture x86_64: 报错 和 ld: ... 
- vue 解决报错1
		[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available ... 
- 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 ... 
随机推荐
- [RPC学习]Dubbo+nacos实现动态更新内存RTree
			1.背景 服务架构一般都是从 单体架构 -> 微服务架构 -> 分布式架构 的迭代,我上一家公司就是在业务发展到一定规模时,开始拆老的单体服务,按业务维度拆成多个微服务,服务之间用的是HT ... 
- 使用allatori混淆代码
			引言 为了保密需要,我们开发出来的程序在实际部署之前,需要先将jar包的代码进行混淆,让用户使用反编译也无法获得源码. allatori就是这样一个混淆java jar包代码的工具. 操作步骤 Ste ... 
- mybatis入门,CRUD,万能Map,模糊查询
			第一个Mybatis程序 核心配置文件mybatis-config.xml <?xml version="1.0" encoding="UTF-8" ?& ... 
- 【FAQ】申请华为运动健康服务授权的4个常见问题及解决方法
			华为运动健康服务(HUAWEI Health Kit)提供原子化数据开放,在获取用户对数据的授权后,应用可通过接口访问运动健康数据,对用户数据进行增.删.改.查等操作,为用户提供运动健康类数据服务.这 ... 
- 安装Sonarqube到CentOS(YUM)
			SonarQube 是一个用于代码质量管理的开源平台,用于管理源代码的质量. 通过插件形式,可以支持包括 java, C#, C/C++, PL/SQL, Cobol, JavaScrip, Groo ... 
- MUI+html5+javascript     点击事件触发页面间传值
			关于如何进行页面转跳,请看 https://www.cnblogs.com/JUNELITTLEPANDA/p/15956176.html,以下跳转方法是采用的其中一种 1- 仅适用于移动端,pc端 ... 
- 为什么Java有了synchronized之后还造了Lock锁这个轮子?
			众所周知,synchronized和Lock锁是java并发变成中两大利器,可以用来解决线程安全的问题.但是为什么Java有了synchronized之后还是提供了Lock接口这个api,难道仅仅只是 ... 
- 牛客多校赛2K Keyboard Free
			Description 给定 \(3\) 个同心圆,半径分别为 \(r1,r2,r3\) ,三个点分别随机分布在三个圆上,求这个三角形期望下的面积. Solution 首先可以固定 \(A\) 点,枚 ... 
- Mac Book安装Windows发烫的问题
			Mac Book安装Windows后,电脑发烫,风扇一直高速旋转.针对此问题百度搜索了一下, 大多数人说更改电源选项,由"平衡"模式改为"节能"模式,亲身体验了 ... 
- SAP APO-供应链监控
			供应链监控(SCM)是一种有效的工具,可以为供应商和购买者做出明智的决策. 供应链流程中的关键人物基于供应链监控做出决策. 供应链包括两个工具- 库存需求清单MD04 物流信息系统(LIS) 事务MD ... 
