# mysql init script not respecting skip-networking?

## manywele

I'm trying to start mysql on my laptop.  It keeps trying to start net.eth0 which fails (since it's not connected to anything at the moment) so mysql won't start.  I tried adding the "skip-networking" option to /etc/conf.d/mysql and to /etc/mysql/my.cnf (which one is the correct place btw?).  The mysql init script is still trying to start net.eth0.  What's the proper way to get mysql to recognize the skip-networking option?  I searched but everyone else seems to be trying to turn networking on.   :Confused: 

----------

## cach0rr0

You've done it the proper way far as mysql is concerned. If you were to fire up mysqld outside of the init system, it would skip networking exactly as you've specified. 

Just, for whatever odd reason, not "proper" as far as the init system is concerned. 

I don't really have a proper answer, as it were, but you could try changing the mysql init script from:

```

depend() {

        use dns net localmount netmount nfsmount

}

```

to

```

depend() {

        use localmount 

}

```

or try fiddling with net.lo's "provide" to ensure it provides "net"

----------

## manywele

Hmm, that's what I was afraid of.  I don't like messing with init scripts that are going to be overwritten the next update and was hoping there was some gentoo way of doing it that I didn't find.  Thanks for the quick reply.

----------

## tomk

Have a look at RC_NET_STRICT_CHECKING in /etc/conf.d/rc.

----------

## lxg

MySQL will always want to use networking in recent versions and always bind to 127.0.0.1 – therefore “skip-networking” is rather obsolete. (I read that somewhere; sorry, don't remember where.)

As tomk said, you can set RC_NET_STRICT_CHECKING to lo, so services depending on net will be satisfied with net.lo, which in this case is the only needed device anyway.

edit: Here it is: In earlier versions of /etc/mysql/my.cnf, shortly after the transition, it said:

```
# Instead of skip-networking the default is now to listen only on

# localhost which is more compatible and is not less secure.

bind-address = 127.0.0.1
```

----------

