当前位置:网站首页>MySQL database error The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid)
MySQL database error The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid)
2022-08-05 08:09:00 【nihui123】
Introduction
Because the server is powered off, the database cannot be connected. I found a lot of examples on the Internet. What permissions are not enough, and what needs to run the initialization script?They did not solve the problem in a timely and fast manner, but brought more problems.
As shown in the figure, this error is reported as soon as the database service is started.Checked for a long time
Solutionp>
Directly find the my.cnf file in the /etc directory and replace the following configuration into it.Then modify it according to your own directory configuration
[mysqld]bind-address=0.0.0.0port=3306user=mysql## This place is modified to the path of personal configurationbasedir=/usr/local/mysqldatadir=/data/mysqlsocket=/tmp/mysql.socklog-error=/data/mysql/mysql.errpid-file=/data/mysql/mysql.pid#character configcharacter_set_server=utf8mb4symbolic-links=0explicit_defaults_for_timestamp=true
One thing to note here is that if the configuration is not appropriate, the following error will appear, but don't worry, there must be a pid file under the path you configured.So either specify the file directly or delete it. After the database service is started, it will be recreated.
Finally perfect launch
The method is real and effective, if it's not suitable, please @blogger in the comment area, the blogger must help solve it!
边栏推荐
猜你喜欢
随机推荐
Vulnhub target drone: HA_ NARAK
达梦数据库大表添加字段
行业应用软件项目经理三步曲
busybox 知:构建
Support touch screen slider carousel plugin
egg框架
SQL SERVER on master-slave table trigger design
nn.unfold和nn.fold
爱情是一部忧伤的乐曲
微信 小程序 之PC端 不支持 wx.previewMedia 方法 故用自定义轮播图进行 模拟照片视频的播放
window.open 全屏展示
基于多块信息提取和马氏距离的k近邻故障监测
ps怎么把图片变清晰,自学ps软件photoshop2022,简单快速用ps让照片更清晰更有质感
爬虫之验证码
Insights in programming
青苹果论坛重新开放
P1160 队列安排
【深度学习实践(一)】安装TensorFlow
[转帖]嫁人一定要嫁工资至少比你高3571.4元的男士
Random code generation