实例讲解启动mysql server失败的解决方法

实例讲解启动mysql server失败的解决方法

来源: 作者: 发表于:2012-08-19 17:15  点击:2470
启动mysql server 失败,查看/var/log/mysqld.err 080329 16:01:29 [ERROR] Cant start server : Bind on unix socket: No such file or directory 080329 16:01:29 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/

启动mysql server 失败,查看/var/log/mysqld.err


080329 16:01:29 [ERROR] Cant start server : Bind on unix socket: No such file or directory

080329 16:01:29 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?

080329 16:01:29 [ERROR] Aborting

080329 16:01:29 InnoDB: Starting shutdown...

080329 16:01:30 InnoDB: Shutdown completed; log sequence number 0 4646872

080329 16:01:30 [Note] /usr/sbin/mysqld: Shutdown complete

百思不得其解,后来查看/var/db/pkg/dev-db/mysql-5.0.56/CONTENTS 文件,或者执行equery f mysql(两种方法非Gentoo 发布不适用),得知安装文件中包含/var/run/d,而这个目录不存在,回忆起之前曾清空过/var/run目录,一直以为这下面的内容都是动态创建,删除之后重启系统即可,看来对mysql 来说还不是这么回事。


创建此目录,并chown,问题解决。


# mkdir /var/run/mysqld

# chown mysql:mysql /var/run/mysqld

posted on 2018-10-20 03:17  与非朋仔  阅读(305)  评论(0编辑  收藏  举报

导航