Mysql启动时候报错

在这里插入图片描述
这个错误是 MySQL 服务未启动 或 socket 文件路径配置不匹配 导致的

# 查看 MySQL 服务状态
systemctl status mysqld  # 若安装的是 mariadb,用 mariadb 替代 mysqld

# 若状态显示 “inactive (dead)”,启动服务
systemctl start mysqld  # 或 systemctl start mariadb

# (可选)设置开机自启,避免下次重启后又失效
systemctl enable mysqld  # 或 systemctl enable mariadb

在这里插入图片描述

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐