1、当启动mysql时日志显示异常为:
[ERROR] Can't start server: Bind on TCP/IP port. Got error: 98: Address already in use , [ERROR] Do you already have another mysqld server running on port: 53306 ? [ERROR] Aborting
2、问题排查:[ERROR] Do you already have another mysqld server running on port: 53306 ? 的意思是:你已经有另一个mysqld服务器在端口上运行:53306?很大可能是53306端口被占用了,使用lsof -I:53306 命令查看。
[root@localhost data]# lsof -i:53306 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 9863 root 507u IPv6 168711349 0t0 TCP localhost:53306->localhost:53306 (ESTABLISHED) java 22669 root 417u IPv6 172789677 0t0 TCP localhost.localdomain:53306->localhost.localdomain:53306 (ESTABLISHED)
发现53306端口被pi为9863和22669的进程所占用着。
3、解决问题:
然后使用kill -9 进程pid 命令杀死这两个进程。
[root@localhost data]# kill -9 22669 [root@localhost data]# kill -9 9863
最后重启MySQL即可,问题就解决了。
[root@localhost bin]# systemctl restart mysql