当前位置:网站首页>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
边栏推荐
猜你喜欢

Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘

The MySQL database in Alibaba Cloud was attacked, and the data was finally recovered

Fragmented NFT (Fractional NFT)

feign调用不通问题,JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r

vulhub靶场学习日记hackme1

uni-app进阶之创建组件/原生渲染【day9】

Redis管道技术/分区

NFTs: The Heart of Digital Ownership

最新MySql安装教学,非常详细

带你搞懂MySQL隔离级别,两个事务同时操作同一行数据会怎样?
随机推荐
uni-app进阶之模版语法与数据绑定【day7】
[Cloud native] Open source data analysis SPL easily copes with T+0
Getting to know regular expressions
MySQL高级学习笔记
工件SSMwar exploded 部署工件时出错。请参阅服务器日志了解详细信息
Linux修改MySQL数据库密码
Eternal blue bug reappears
uni-app进阶之认证【day12】
Build vulhub vulnerability shooting range on kali
let和const命令
NFT:数字所有权的核心
【云原生】SQL(及存储过程)跑得太慢怎么办?
解决响应式数据依赖响应式数据无响应问题
继承、Super,重写、抽象类、抽象方法 1(第七天)
[JVM Loading]---Class Loading Mechanism
Object,多态 1(第八天)
gin框架学习-Gin框架和Gorm框架搭建一个简单的API微服务
【uiautomation】微信好友列表获取(存储到txt中)
Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
leetcode-每日一题873. 最长的斐波那契子序列的长度(哈希和二分)