当前位置:网站首页>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!
边栏推荐
猜你喜欢
随机推荐
Use of thread pool (combined with Future/Callable)
RedisTemplate: error template not initialized; call afterPropertiesSet() before using it
Qt writes custom controls: one of the text spotlight effects
存储过程编写经验和优化措施
【无标题】长期招聘硬件工程师-深圳宝安
JS语法使用
Beautifully painted MM set
别把你的天使弄丢了
Insights in programming
[Untitled] Long-term recruitment of hardware engineers-Shenzhen Baoan
向美国人学习“如何快乐”
原型&原型链
Game Thinking 19: Multi-dimensional calculation related to games: point product, cross product, point-line-surface distance calculation
吴恩达深度学习deeplearning.ai——第一门课:神经网络与深度学习——第二节:神经网络基础(下)
Algorithm Supplements Fifteen Complementary Linked List Related Interview Questions
Embedded Systems: Basic Timers
Vulnhub target drone: HA_ NARAK
Redis常用命令
MVCC of Google's Fragmented Notes (Draft)
写出了一个CPU占用极高的代码后引发的思考








![[Structural Internal Power Cultivation] The Mystery of Enumeration and Union (3)](/img/39/d20f45ccc86ebc4e5aebc8e4d0115f.png)
