MySQLBindonunixsocket:Add-创新互联

场景

创新互联建站是专业的雨湖网站建设公司,雨湖接单;提供网站设计、成都网站建设,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行雨湖网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!

[root@localhost bin]# ./mysqld
2020-01-15 17:52:02 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-01-15 17:52:02 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2020-01-15 17:52:02 0 [Note] ./mysqld (mysqld 5.6.44) starting as process 90367 ...
2020-01-15 17:52:02 90367 [Note] Plugin 'FEDERATED' is disabled.
2020-01-15 17:52:02 90367 [Note] InnoDB: Using atomics to ref count buffer pool pages
2020-01-15 17:52:02 90367 [Note] InnoDB: The InnoDB memory heap is disabled
2020-01-15 17:52:02 90367 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-01-15 17:52:02 90367 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-01-15 17:52:02 90367 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-01-15 17:52:02 90367 [Note] InnoDB: Using Linux native AIO
2020-01-15 17:52:02 90367 [Note] InnoDB: Not using CPU crc32 instructions
2020-01-15 17:52:02 90367 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2020-01-15 17:52:02 90367 [Note] InnoDB: Completed initialization of buffer pool
2020-01-15 17:52:02 90367 [Note] InnoDB: Highest supported file format is Barracuda.
2020-01-15 17:52:02 90367 [Note] InnoDB: 128 rollback segment(s) are active.
2020-01-15 17:52:02 90367 [Note] InnoDB: Waiting for purge to start
2020-01-15 17:52:02 90367 [Note] InnoDB: 5.6.44 started; log sequence number 18755961
2020-01-15 17:52:02 90367 [Note] Server hostname (bind-address): '*'; port: 3306
2020-01-15 17:52:02 90367 [Note] IPv6 is available.
2020-01-15 17:52:02 90367 [Note]   - '::' resolves to '::';
2020-01-15 17:52:02 90367 [Note] Server socket created on IP: '::'.
2020-01-15 17:52:02 90367 [ERROR] Can't start server : Bind on unix socket: Address already in use
2020-01-15 17:52:02 90367 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
2020-01-15 17:52:02 90367 [ERROR] Aborting

排查过程

1)管道文件已经存在

2020-01-15 17:52:02 90367 [ERROR] Can't start server : Bind on unix socket: Address already in use
2020-01-15 17:52:02 90367 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?

2)查看文件属性以及查看进程占用

[root@localhost tmp]# file mysqld.sock
mysqld.sock: socket

[root@localhost tmp]# fuser /tmp/mysql.sock

没有发现任何进程占用,说明该文件不是由mysqld进程创建的,并且没有任何的服务占用该管道文件,该管道文件一般用于本地的mysql服务器和客户端通信的通道。默认情况下,mysql主进程在启动的时候创建该文件,退出的时候,会删除该文件,通过删除该文件,解决上面的问题。

3)启动mysql服务,查看占用过程

[root@localhost tmp]# fuser /tmp/mysql.sock
/tmp/mysqld.sock:    76533
[root@localhost tmp]# lsof /tmp/mysql.sock
COMMAND   PID  USER   FD   TYPE             DEVICE SIZE/OFF    NODE NAME
mysqld  76533 mysql   22u  unix 0x00000000f901123c      0t0 8234599 /tmp/mysql.sock

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


本文题目:MySQLBindonunixsocket:Add-创新互联
网站地址:http://myzitong.com/article/cdhoed.html