These forums are read-only!
MySQL Won't Bootup. Port 3306 being used?
  • I recently had my slice resized to 512mb and now I cannot get mysql to start up. Any advice? Here is some of the output.

    MarketingWithAFlair ~: sudo mysql
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

    MarketingWithAFlair ~: sudo /etc/init.d/mysql stop
    * Stopping MySQL database server mysqld
    ...done.

    MarketingWithAFlair ~: sudo mysqld --console
    081216 21:39:53 InnoDB: Started; log sequence number 0 746382
    081216 21:39:53 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
    081216 21:39:53 [ERROR] Do you already have another mysqld server running on port: 3306 ?
    081216 21:39:53 [ERROR] Aborting

    081216 21:39:53 InnoDB: Starting shutdown...
    081216 21:39:55 InnoDB: Shutdown completed; log sequence number 0 746382
    081216 21:39:55 [Note] mysqld: Shutdown complete
  • Ah OK I found the solution. If you can't figure out why your port is not opening switch to root and try running:
    'ifconfig'

    On a working slice you'll see:

    eth0 Link encap:Ethernet HWaddr 40:40:ad:2d:e5:6b
    ...

    lo Link encap:Local Loopback
    ...

    If you don't see low you have a problem preventing your local loopback from booting up properly. Try this:
    sudo ifup lo

    In my case I was getting this output:
    >> sudo ifup lo
    iptables v1.3.8: no command specified
    Try `iptables -h' or 'iptables --help' for more information.
    Failed to bring up lo.

    Specifically, I had a typo in my /etc/network/interfaces:
    pre-up iptables < /etc/iptables.up.rules

    I was missing the command for iptables and needed to replace it with:
    pre-up iptables-restore < /etc/iptables.up.rules

    Note the '-restore', this was a typo I made setting up the slice. All in all I hope this helps. If you get stuck on a reboot with mysql not starting check to ensure lo is up!
  • We just ran into this problem as well. We had made a typo in /etc/network/interfaces that was causing the loopback address to not be initialized correctly.
  • Good to know, thanks for posting your solution.