码迷,mamicode.com
首页 > 数据库 > 详细

mysqld启动“ Can't start server: Bind on TCP/IP port: Address already in use

时间:2017-09-08 18:02:35      阅读:767      评论:0      收藏:0      [点我收藏+]

标签:mysql

[root@localhost ~]# vi /var/log/mysqld.log 


进入log日志发现报以下的错误:

170901  4:56:54  InnoDB: Initializing buffer pool, size = 8.0M
170901  4:56:54  InnoDB: Completed initialization of buffer pool
170901  4:56:55  InnoDB: Started; log sequence number 0 44233
170901  4:56:55 [ERROR] Can‘t start server: Bind on TCP/IP port: Address already in use
170901  4:56:55 [ERROR] Do you already have another mysqld server running on port: 3306 ?
170901  4:56:55 [ERROR] Aborting

这个问题是因为3306端口被占用:

[root@localhost ~]# netstat -tunlp|grep mysql

tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      1672/mysqld         

[root@localhost ~]# kill -9 1672
[root@localhost ~]# service mysqld start
正在启动 mysqld:                                          [确定]


[root@localhost ~]# mysqladmin -uroot password 123456
[root@localhost ~]# mysql -uroot -p123456
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql>


解决啦!!!!!


本文出自 “版图” 博客,请务必保留此出处http://bantu.blog.51cto.com/13086752/1963673

mysqld启动“ Can't start server: Bind on TCP/IP port: Address already in use

标签:mysql

原文地址:http://bantu.blog.51cto.com/13086752/1963673

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!