当前位置:网站首页>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=trueOne 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!
边栏推荐
- [Repost] Marry a man must marry a man whose salary is at least 3571.4 yuan higher than yours
- RedisTemplate: 报错template not initialized; call afterPropertiesSet() before using it
- 七夕?编程?
- Jmeter永久设置中文界面
- TensorFlow安装步骤
- SVG星球大战样式Toggle切换开关按钮
- 关于MP3文件中找不到TAG标签的问题
- ps怎么替换颜色,自学ps软件photoshop2022,ps一张图片的一种颜色全部替换成另外一种颜色
- 生命的颜色占卜
- 程序设计中的感悟
猜你喜欢
随机推荐
php向mysql写入数据失败
MongoDB 语法大全
爱情是一部忧伤的乐曲
在原有数据库基础上执行sql文件有则跳过没有则添加如何实现?
Algorithm Supplements Fifteen Complementary Linked List Related Interview Questions
【结构体内功修炼】结构体实现位段(二)
控制器-----controller
存储过程编写经验和优化措施
生命的颜色占卜
【每日一题】1403. 非递增顺序的最小子序列
How Entrepreneurs Attract Venture Capitalists
执子之手,与子偕老。你同意么?
moment的使用
二叉树进阶复习1
Stored procedure writing experience and optimization measures
Qt writes custom controls: one of the text spotlight effects
[Structural Internal Power Cultivation] The Mystery of Enumeration and Union (3)
D2--FPGA SPI接口通信2022-08-03
Beautifully painted MM set
写出了一个CPU占用极高的代码后引发的思考









![[Structure internal power practice] Structure memory alignment (1)](/img/31/4ddc16810da8238ac95a93d007e12e.png)