# mysql server will not start on boot

## nomadicME

Here is an exerpt from /var/log/mysql/mysqld.err:

 *Quote:*   

> 
> 
> 120715 14:08:03 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
> 
> 120715 14:08:03 [ERROR] Do you already have another mysqld server running on port: 3306 ?
> ...

 

Here is an exerpt from /etc/mysql/my.cnf

 *Quote:*   

> 
> 
> # The following options will be passed to all MySQL clients
> 
> [client]
> ...

 

The bind-address is set to be assigned to eth0 by wicd and wicd does start before mysql tries to start.  The firewall is shutdown.  Here are the permissions on /var/run/mysqld/:

 *Quote:*   

> 
> 
> drwxr-xr-x 2 mysql mysql 4096 Jul 15 14:12 .
> 
> drwxr-xr-x 9 root  root  4096 Jul 15 14:10 ..
> ...

 

Here is the output from "rc-status -a":

 *Quote:*   

> 
> 
> Runlevel: default
> 
>  syslog-ng                                                                                                     [  started  ]
> ...

 

My current workaround has been to take this service out of the default run level and then start it manually once I'm logged in, which works fine btw.  It just will not connect automatically on boot, instead it hangs on "starting mysql" (if I leave mysql in the default run level).

Any ideas?  Thanks.

----------

## oldiest

Remove WICD init from default ... and add to boot ..

# eselect rc delete wicd default

# eselect rc add wicd boot

Add reboot the computer ...

# reboot

----------

## nomadicME

oldiest, thank you for your idea.  However, wicd is in the boot runlevel.  Sorry it isn't very clear from the data I previously posted.  Here is, hopefully, a clearer picture of the boot and default runlevels:

 *Quote:*   

> 
> 
> $ ls /etc/runlevels/boot/
> 
> drwxr-xr-x 2 root root 4096 Mar 23 07:53 .
> ...

 

----------

## oldiest

are you using dhcp for your network in eth0? if you using dhcp, change bind-address in /etc/mysql/my.cnf to 127.0.0.1.

----------

## nomadicME

Update:

I've narrowed the problem down to using wicd with mysql binding to an externally accessible ip address.  If I set the bind-address = 127.0.0.1 in /etc/mysql/my.cnf then everything works as expected, but I cannot reach my mysql server from anywhere else on my network.  If anyone has the wicd/mysql bound to external ip configuration working please chime in.  This configuration was working fine on this machine until an upgrade around the beginning of 2012.

I've also found another workaround.  I really don't need the flexibility of wicd on this machine as it is a server that is rarely rebooted or shutdown and is always plugged into the ethernet cable.  So I configured the network manually in /etc/conf.d/net and added /etc/init.d/net.eth0 to the boot runlevel.  This configuration works fine so it is definately a problem with wicd.

I wouldn't consider this matter solved, however.  If you have any ideas please let us know.  Thanks.

----------

