MySQL守护进程拒绝启动与“无法启动服务器:地址已在使用中:TCP / IP端口绑定”(这不是)

2019-06-26 15:05发布

好球员,我已经准备好血腥放弃这件事情,我觉得我几乎没有,虽然,只是最后的错误,服务器启动了罚款,但后来它没有说,TCP / IP端口上绑定已在用途:■哪些是不正确的,因为MySQL是没有运行:(

错误:

bash-4.2$ mysqld
120730 18:31:05 [Note] Plugin 'FEDERATED' is disabled.
120730 18:31:05 InnoDB: The InnoDB memory heap is disabled
120730 18:31:05 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120730 18:31:05 InnoDB: Compressed tables use zlib 1.2.5
120730 18:31:05 InnoDB: Using Linux native AIO
120730 18:31:05 InnoDB: Initializing buffer pool, size = 128.0M
120730 18:31:05 InnoDB: Completed initialization of buffer pool
120730 18:31:06 InnoDB: highest supported file format is Barracuda.
120730 18:31:06  InnoDB: Waiting for the background threads to start
120730 18:31:07 InnoDB: 1.1.8 started; log sequence number 2929794
120730 18:31:07 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
120730 18:31:07 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
120730 18:31:07 [Note] Server socket created on IP: '0.0.0.0'.
120730 18:31:07 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
120730 18:31:07 [ERROR] Do you already have another mysqld server running on port: 3306 ?
120730 18:31:07 [ERROR] Aborting

120730 18:31:07  InnoDB: Starting shutdown...
120730 18:31:08  InnoDB: Shutdown completed; log sequence number 2929794
120730 18:31:08 [Note] mysqld: Shutdown complete

Answer 1:

使用lsof -i TCP:3306netstat -lp | grep 3306 netstat -lp | grep 3306找出已在侦听端口3306 -东西,要在被监听。

你可以考虑盯着的不同端口服务器(编辑my.cnf文件和更改默认端口那里)。

您可能需要运行此为根,即sudo lsof -i TCP:3306



文章来源: MySQL daemon refuses to start with “Can't start server: Bind on TCP/IP port: Address already in use” (it's not). [closed]