当前位置:网站首页>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服务,问题解决
边栏推荐
- 1087 all roads lead to Rome (30 points)
- Go practice -- gorilla/rpc (gorilla/rpc/json) used by gorilla web Toolkit
- ninja: build stopped: subcommand failed.
- Why should we rewrite hashcode when we rewrite the equals method?
- [set theory] relationship properties (common relationship properties | relationship properties examples | relationship operation properties)
- About debugging the assignment of pagenum and PageSize of the formal parameter pageweb < T > (i.e. page encapsulation generic) in the controller
- 联想R7000显卡的拆卸与安装
- Go practice -- factory mode of design patterns in golang (simple factory, factory method, abstract factory)
- Three representations of signed numbers: original code, inverse code and complement code
- 【批处理DOS-CMD命令-汇总和小结】-CMD窗口的设置与操作命令-关闭cmd窗口、退出cmd环境(exit、exit /b、goto :eof)
猜你喜欢
(perfect solution) how to set the position of Matplotlib legend freely
SimpleITK学习笔记
Overview of basic knowledge of C language
Webrtc protocol introduction -- an article to understand ice, stun, NAT, turn
Class loading mechanism (detailed explanation of the whole process)
JS dynamic table creation
[research materials] 2021 China's game industry brand report - Download attached
Botu uses peek and poke for IO mapping
leetcode406. Rebuild the queue based on height
Pan details of deep learning
随机推荐
Basic introduction of redis and explanation of eight types and transactions
【实战项目】自主web服务器
Introduction to redis and explanation of data types
大学校园IP网络广播-厂家基于校园局域网的大学校园IP广播方案设计指南
Force GCC to compile 32-bit programs on 64 bit platform
Robot capture experiment demonstration video
JS dynamic table creation
Technical analysis of qianyuantong multi card aggregation router
Why should we rewrite hashcode when we rewrite the equals method?
Dynamic programming - related concepts, (tower problem)
Go practice -- use redis in golang (redis and go redis / redis)
Go practice - gorilla / handlers used by gorilla web Toolkit
1106 lowest price in supply chain (25 points)
Appium 1.22. L'Inspecteur appium après la version X doit être installé séparément
1099 build a binary search tree (30 points)
MySQL master-slave configuration
1115 counting nodes in a BST (30 points)
50 practical applications of R language (36) - data visualization from basic to advanced
最大连续子段和(动态规划,递归,递推)
leetcode406. Rebuild the queue based on height