Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't start server: Bind on TCP/IP port: Cannot assign requested address [closed]

Tags:

mysql

ubuntu

I rebooted my server yesterday, unfortunately mysql cannot be started now.

The error log is as following:

root@site-digger:/var/log/mysql# cat error.log 
130216 16:11:32 [Note] Plugin 'FEDERATED' is disabled.
130216 16:11:32  InnoDB: Initializing buffer pool, size = 8.0M
130216 16:11:32  InnoDB: Completed initialization of buffer pool
130216 16:11:33  InnoDB: Started; log sequence number 0 1382359817
130216 16:11:33 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
130216 16:11:33 [ERROR] Do you already have another mysqld server running on port: 3306 ?
130216 16:11:33 [ERROR] Aborting

130216 16:11:33  InnoDB: Starting shutdown...
130216 16:11:38  InnoDB: Shutdown completed; log sequence number 0 1382359817
130216 16:11:38 [Note] /usr/sbin/mysqld: Shutdown complete
...

I checked and didn't find any program is using 3306, please see following.

root@site-digger:/var/log/mysql# sudo netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 site-digger.com:59367   li566-52.members.li:ssh ESTABLISHED
tcp        0      0 site-digger.com:ssh     61.150.56.248:65255     ESTABLISHED
tcp        0    216 site-digger.com:ssh     61.150.56.248:61553     ESTABLISHED
tcp        0      0 site-digger.com:www     1.82.9.18:55526         TIME_WAIT  
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ]         DGRAM                    600880492 
unix  3      [ ]         STREAM     CONNECTED     600845962 
unix  3      [ ]         STREAM     CONNECTED     600845961 
unix  3      [ ]         STREAM     CONNECTED     600596531 
unix  3      [ ]         STREAM     CONNECTED     600596530 

I tried sudo mysql start. But still not working. OS: Ubuntu 11.10

The results for netstat -a -t is as following:

root@site-digger:/var/log/mysql# netstat -a -t
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 *:www                   *:*                     LISTEN     
tcp        0      0 *:ssh                   *:*                     LISTEN     
tcp        0      0 *:https                 *:*                     LISTEN     
tcp        0  20824 site-digger.com:59367   li566-52.members.li:ssh ESTABLISHED
tcp        0      0 site-digger.com:ssh     61.150.56.248:65255     ESTABLISHED
tcp        0     52 site-digger.com:ssh     61.150.56.248:61553     ESTABLISHED
tcp        0      0 site-digger.com:www     crawl-66-249-73-2:45760 TIME_WAIT  
tcp        0      0 site-digger.com:www     218.30.103.146:49094    TIME_WAIT  
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN     
like image 326
redice Avatar asked Feb 16 '13 08:02

redice


1 Answers

Port 33 06. not 60. Netstat only shows active connections, not idle ones which are merely listening. You need netstat -a -t (to show only tcp ports).

like image 95
Marc B Avatar answered Sep 20 '22 13:09

Marc B