知识点

相关文章

更多

最近更新

更多

Another MySQL daemon already running with the same unix socket.

2019-03-04 23:47|来源: -- --

两个方法解决:

第一个是立即关机 使用命令 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


转自:http://hi.baidu.com/tf8615/item/75d7a6b0ac8be042ba0e1282

相关问答

更多
  • 几乎所有的Linux系统上都有一个名为pgrep的实用程序。 你可以做: pgrep -f docker > /dev/null || echo "starting docker" 用您的docker starting命令替换`echo命令。 You have a utility called pgrep on almost all the Linux systems. You can just do: pgrep -f docker > /dev/null || echo "starting docke ...
  • 我们来看看bind的手册页 int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen); 第三个参数是addrlen addrlen指定addr指向的地址结构的大小(以字节为单位)。 那么,你应该传递的是sizeof local_address 。 相反,您传递的length是socket_path.size() + sizeof(local_address.sun_family) 。 这个大小几乎足够了 ...
  • 结帐JUDS库。 它是一个Java Unix域套接字库... https://github.com/mcfunley/juds Checkout the JUDS library. It is a Java Unix Domain Socket library... https://github.com/mcfunley/juds
  • 为了防止发生问题,您必须从命令行执行服务器的正常关闭,而不是关闭服务器电源。 # shutdown -h now 这将在停机之前停止正在运行的服务。 基于Centos,当遇到这个问题时,再次重新提供一个额外的方法是移动mysql.sock: # mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak # service mysqld start 重新启动服务将创建一个名为mqsql.sock的新条目 To prevent the probl ...
  • 此功能仅在Unix上启用unix功能时可用。 以及如何激活功能 在您的情况下,只需将此添加到您的货物清单: [dependencies.socket2] version = "0.3.7" features = ["unix"] This function is only available on Unix when the unix feature is activated. And How to activate a feature In your case just add this to your ...
  • 您必须在HHVM创建文件之后手动更改文件所有权。 或者使用TCP模式而不是unix sock。 在我的Docker中,我有一项服务,如: #!/bin/sh set -e # @todo this is horrible (but HHVM is creating socket as root user) while [ ! -S /var/run/php5-fpm.sock ] do usleep 1 done chown www-data /var/run/php5-fpm.sock sv ...
  • Docker客户端仅提供cli,它只是一个http api包装器,就像aws cli一样。 Docker守护程序是整个操作背后的大脑,就像aws本身一样。 当你使用docker run命令启动一个容器时,你的docker客户端将把这个命令翻译成http API调用,将它发送到docker守护进程,然后Docker守护进程评估请求,与底层os进行对话并为你的容器提供配置。 请注意,docker cli可以连接到远程docker守护程序,您可以配置docker守护程序以使用tcp IP。 问:在我看来,在团队中 ...
  • 我可以想到两个选择: 1.更改systemd单元文件: ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock 这样,您将在tcp上侦听网络API调用,并在unix sock上侦听本地docker cli 。 2.尝试使用docker cli进行连接时,请使用以下命令: export DOCKER_HOST="tcp://0.0.0.0:2375" docker ps 同样效果一个班轮: sudo d ...
  • 这是CR_SOCKET_CREATE_ERROR ,由客户端代码生成的错误。 12可能是你的客户的errno 。 您系统上的错误12是什么? 对我来说,使用mysql perror命令行实用程序,它是“操作系统错误代码12:无法分配内存” This is CR_SOCKET_CREATE_ERROR, an error generated by the client code. The 12 is probably your client's errno. What is error 12 on your ...