当前位置:网站首页>mysql启动报错:The server quit without updating PID file几种解决办法
mysql启动报错:The server quit without updating PID file几种解决办法
2022-07-03 05:18:00 【 】
1.目录权限问题
对mysql的安装目录和数据目录分别进行授权
#chown -R mysql.mysql /usr/local/mysql
#chown -R mysql.mysql /data/mysql
#service mysqld start
2.可能进程里已经存在mysql进程
解决方法:用命令“ps -ef|grep mysqld”查看是否有mysqld进程,如果有使用“kill -9 进程号”杀死,然后重新启动mysqld!
3.可能是第二次在机器上安装mysql,有残余数据影响了服务的启动。
解决方法:去mysql的数据目录/data看看,如果存在mysql-bin.index,就赶快把它删除掉吧,它就是罪魁祸首了。
4.mysql在启动时没有指定配置文件时会使用/etc/my.cnf配置文件,请打开这个文件查看在[mysqld]节下有没有指定数据目录(datadir)。
解决方法:请在[mysqld]下设置这一行:datadir = /usr/local/mysql/data
5.可能是/usr/local/mysql/data/mysql.pid文件没有写的权限
解决方法 :给予权限,执行 “chown -R mysql:mysql /var/data” “chmod -R 755 /usr/local/mysql/data” 然后重新启动mysqld!
6.selinux惹的祸,如果是centos系统,默认会开启selinux
解决方法:关闭它,打开/etc/selinux/config,把SELINUX=enforcing改为SELINUX=disabled后存盘退出重启机器试试
7.删除mysql库文件/data/mysql/中的“ib_*”文件,注意:** 执行该操作之前一定要对数据库进行备份,因为ibdata1存放的是所有数据文件,如果不小心删了库,那就惨了!!!(传说中的从删库到跑路。。。),然后重启mysql。
8.查看日志有如下错误提示:Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed。
解决办法:
[[email protected] mysql]# rm -rf ib_logfile*
然后启动mysql,问题解决!
9.看日志有这样的字样“initialize buffer pool,size=128.0M”,“cannot allocate memory for the pool”,大概意思是说无法分配足够的内存供pool使用。此时想到mysql配置文件中有相关的配置,于是更改如下参数:
innodb_buffer_pool_size = 128
#配置文件中该值默认为128M
将这个值调小,再次启动mysql服务,问题解决!
10.系统上缺少mysql的依赖文件
#yum -y install libaio
#yum -y install numactl
重新启动mysql服务,问题解决
边栏推荐
- Objects. Requirenonnull method description
- Pessimistic lock and optimistic lock of multithreading
- Force GCC to compile 32-bit programs on 64 bit platform
- 1119 pre- and post order traversals (30 points)
- Yolov5 input (II) | CSDN creative punch in
- ES7 easy mistakes in index creation
- Rust基础入门之(基本类型)
- Win10 install pytullet and test
- XML配置文件
- 【批处理DOS-CMD命令-汇总和小结】-CMD窗口的设置与操作命令-关闭cmd窗口、退出cmd环境(exit、exit /b、goto :eof)
猜你喜欢

Online VR model display - 3D visual display solution

3dslam with 16 line lidar and octomap

Shallow and first code
![[basic grammar] C language uses for loop to print Pentagram](/img/9e/021c6c0e748e0981d4233f74c83e76.jpg)
[basic grammar] C language uses for loop to print Pentagram

Audio Focus Series: write a demo to understand audio focus and audiomananger

Introduction to deep learning (II) -- univariate linear regression

How to connect the network: Chapter 2 (Part 1): a life cycle of TCP connection | CSDN creation punch in

Promise

小学校园IP网络广播-基于校园局域网的小学IP数字广播系统设计

Class loading mechanism (detailed explanation of the whole process)
随机推荐
Making coco datasets
Redis 击穿穿透雪崩
Redis 入门和数据类型讲解
BIO、NIO、AIO区别
Dynamic programming - related concepts, (tower problem)
Actual combat 8051 drives 8-bit nixie tube
[set theory] relational power operation (relational power operation | examples of relational power operation | properties of relational power operation)
leetcode435. Non overlapping interval
酒店公共广播背景音乐-基于互联网+的酒店IP网络广播系统设计
study hard and make progress every day
Messy change of mouse style in win system
Detailed explanation of the output end (head) of yolov5 | CSDN creation punch in
Gbase8s unique index and non unique index
Primary school campus IP network broadcasting - Design of primary school IP digital broadcasting system based on campus LAN
最大连续子段和(动态规划,递归,递推)
Why is go language particularly popular in China
1106 lowest price in supply chain (25 points)
乾元通多卡聚合路由器的技术解析
Redis 入門和數據類型講解
[backtrader source code analysis 4] use Python to rewrite the first function of backtrader: time2num, which improves the efficiency by 2.2 times