当前位置:网站首页>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
边栏推荐
- 【C语言3个基本结构详解——顺序、选择、循环】
- DeFi 项目中的治理Token
- leetcode-每日一题1252. 奇数值单元格的数目(模拟优化)
- What is GameFi?
- 11 【组件通信】
- The process and specific code of sending SMS verification code using flask framework
- win11中利用IIS10搭建asp网站
- feign调用不通问题,JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
- Judgment of database in SQL injection
- vulhub靶场学习日记SickOs1.2
猜你喜欢
随机推荐
永恒之蓝漏洞复现
对递归的一些感悟
Build vulhub vulnerability shooting range on kali
Linux modify MySQL database password
【云原生】开源数据分析 SPL 轻松应对 T+0
阿里一面,说说你知道消息中间件的应用场景有哪些?
uni-app进阶之样式框架/生产环境【day10】
闭包(二)
1D, 2D, 3D convolution operations in pytorch
Yuan prospect and four track of the universe
MySql创建数据表
leetcode-每日一题1217. 玩筹码(贪心+位运算)
Getting to know regular expressions
字符串的新增方法
Detailed explanation of pointers in C language
变量的解构赋值
Volatility取证工具使用日记
03 【数据代理 事件处理】
DeFi Token in the project management
【云原生】SQL(及存储过程)跑得太慢怎么办?







![[Ubuntu20.04 installs MySQL and MySQL-workbench visualization tool]](/img/3d/1b65fb33bfbf22da8243df1ab33ed5.png)
