Another mysql daemon already running with the same unix socket

本文涉及的产品
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,集群系列 2核4GB
简介: 在国外网站发现的解决方法。 原因多个Mysql进程使用了同一个socket。 两个方法解决: 第一个是立即关机 使用命令 shutdown -h now 关机,关机后在启动,进程就停止了。 第二个直接把mysql.sock文件改名即可。

在国外网站发现的解决方法。

原因多个Mysql进程使用了同一个socket。

两个方法解决:

第一个是立即关机 使用命令 shutdown -h now 关机,关机后在启动,进程就停止了。

第二个直接把mysql.sock文件改名即可。也可以删除,推荐改名。

然后就可以启动mysql了。

 

下面是国外原文

 

To prevent the problem from occurring, you must perform a graceful shutdown of the server from the command line rather than powering off the server.

# shutdown -h now


This will stop the running services before powering down the machine.

Based on Centos, an additional method for getting it back up again when you run into this problem is to move mysql.sock:

# mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

# service mysqld start
Restarting the service creates a new entry called mqsql.sock

相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
目录
相关文章
|
5月前
|
网络协议 安全 Unix
UNIX域套接字(Unix Domain Socket,UDS)之所以高效
UNIX域套接字(Unix Domain Socket,UDS)之所以高效
380 3
|
5月前
|
监控 安全 Unix
UNIX域套接字(Unix Domain Socket)在安全性和隐私性
UNIX域套接字(Unix Domain Socket)在安全性和隐私性
202 2
|
9天前
|
关系型数据库 MySQL 数据库
docker启动mysql多实例连接报错Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’
docker启动mysql多实例连接报错Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’
35 0
|
2月前
|
存储 SQL 关系型数据库
|
3月前
|
网络协议 关系型数据库 MySQL
启动mysql时的异常为:[ERROR] Can‘t start server: Bind on TCP/IP port. Got error: 98: Address already in used
启动mysql时的异常为:[ERROR] Can‘t start server: Bind on TCP/IP port. Got error: 98: Address already in used
|
5月前
|
存储 关系型数据库 MySQL
MySQL 格式化日期函数 DATE_FORMAT(), FROM_UNIXTIME() 和 UNIX_TIMESTAMP() 之间区别
MySQL 格式化日期函数 DATE_FORMAT(), FROM_UNIXTIME() 和 UNIX_TIMESTAMP() 之间区别
139 1
|
11月前
|
Unix Docker 容器
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker
107 0
|
11月前
|
关系型数据库 MySQL 数据库
cant connect to local MySQL server through socket /tmp/mysql.sock (2)
cant connect to local MySQL server through socket /tmp/mysql.sock (2)
150 0
cant connect to local MySQL server through socket /tmp/mysql.sock (2)
|
12月前
|
关系型数据库 MySQL
MySQL安装--显示sever name has already exists
MySQL安装--显示sever name has already exists
62 1
|
10月前
|
网络协议 Unix Go
Go unix domain socket通信
Go unix domain socket通信

热门文章

最新文章

下一篇
无影云桌面