当前位置:网站首页>Several solutions for mysql startup error The server quit without updating PID file
Several solutions for mysql startup error The server quit without updating PID file
2022-07-31 05:52:00 【m0_67391401】
1. Directory permission problem
Authorize the mysql installation directory and data directory respectively
#chown -R mysql.mysql /usr/local/mysql
#chown -R mysql.mysql /data/mysql
#service mysqld start
2. There may already be a mysql process in the process.
Solution: use the command "ps -ef|grep mysqld" to check whether there is a mysqld process, if there is, use "kill -9 process number" to kill, and then restartmysqld!
3. It may be the second time to install mysql on the machine, and there is residual data that affects the startup of the service.
Solution: Go to the data directory /data of mysql to see if there is mysql-bin.index, delete it as soon as possible, it is the culprit.
4.mysql uses the /etc/my.cnf configuration file when no configuration file is specified at startup. Please open this file to see if the data directory (datadir) is specified under the [mysqld] section.
Workaround: Please set this line under [mysqld]: datadir = /usr/local/mysql/data
5. It may be that the /usr/local/mysql/data/mysql.pid file does not have permission to write
Solution: give permission, execute "chown -R mysql:mysql /var/data" "chmod -R755 /usr/local/mysql/data" and restart mysqld!
6.selinux is the fault, if it is a centos system, selinux will be enabled by default
Solution: close it, open /etc/selinux/config, change SELINUX=enforcing to SELINUX=disabled, save and exit and restart the machinetry
7. Delete the "ib_*" files in the mysql library file /data/mysql/, note: **Be sure to back up the database before performing this operation, because ibdata1 stores all data files, if you delete it accidentallyIf you leave the library, it will be miserable!!!(The legend goes from deleting the library to running away...), then restart mysql.
8. Checking the log shows the following error message: Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Solution:
[[email protected] mysql]# rm -rf ib_logfile*
Then start mysql, the problem is solved!
9. Look at the log with the words "initialize buffer pool, size=128.0M", "cannot allocate memory for the pool", which probably means that enough memory cannot be allocated for the pool to use.At this time, I thought that there are related configurations in the mysql configuration file, so I changed the following parameters:
innodb_buffer_pool_size = 128
#The value in the configuration file defaults to 128M
Reduce this value and start the mysql service again, the problemsolve!
10. The mysql dependency file is missing on the system
#yum -y install libaio
#yum -y install numactl
Restart the mysql service, the problem is solved
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
猜你喜欢
闭包(三)----执行环境
Build DVWA with phpstudy
什么是 GameFi?
feign调用不通问题,JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
Using IIS10 to build an asp website in win11
leetcode-每日一题剑指 Offer II 041. 滑动窗口的平均值(队列模拟)
(Crypto essential dry goods) Detailed analysis of the current NFT trading markets
[Elastic-Job source code analysis] - job listener
数字取证autopsy工具用法
[windows]--- SQL Server 2008 super detailed installation tutorial
随机推荐
mysql password modification method in Linux (pro-test available)
代码块、Package,Import,封装(第六天)
Common JVM interview questions and answers
gin框架学习-GORM框架进阶之CRUD接口(数据库增删改查操作)
11 【组件通信】
leetcode-每日一题731. 我的日程安排表 II
wpf ScrowViewer水平滚动
leetcode-每日一题1217. 玩筹码(贪心+位运算)
uni-app进阶之样式框架/生产环境【day10】
闭包(四)----IIFE
在kali上搭建vulhub漏洞靶场
leetcode-829. 连续整数求和(数论)
MySQL高级SQL语句(二)
13 【代理配置 插槽】
04 【计算属性 侦听属性】
什么是 GameFi?
GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
永恒之蓝漏洞复现
leetcode-每日一题735. 行星碰撞(栈模拟)
Build vulhub vulnerability shooting range on kali