当前位置:网站首页>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!
边栏推荐
猜你喜欢
随机推荐
随机码的生成
导出SQLServer数据到Excel中
Illegal key size 报错问题
[Structural Internal Power Cultivation] Structural Realization Stages (2)
MySQL 数据库 报错 The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid)
v-if/v-else determines whether to display according to the calculation
力扣刷题八月第一天
创业者如何吸引风险投资商
DataFrame insert row and column at specified position
图片地址转为base64
uniapp时间组件封装年-月-日-时-分-秒
Redis cache and existing problems--cache penetration, cache avalanche, cache breakdown and solutions
控制器-----controller
Green Apple Forum reopens
ps怎么拼图,自学ps软件photoshop2022,PS制作拼图效果
RedisTemplate: 报错template not initialized; call afterPropertiesSet() before using it
向美国人学习“如何快乐”
唤醒手腕 - 微信小程序、QQ小程序、抖音小程序学习笔记(更新中)
Beautifully painted MM set
行业应用软件项目经理三步曲








