Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mysql server will not start on boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nomadicME
n00b
n00b


Joined: 24 Mar 2012
Posts: 46

PostPosted: Sun Jul 15, 2012 8:27 pm    Post subject: mysql server will not start on boot Reply with quote

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 ?
120715 14:08:03 [ERROR] Aborting


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

Quote:

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/run/mysqld/mysqld.sock

[mysql]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqladmin]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlcheck]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqldump]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlimport]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[mysqlshow]
character-sets-dir=/usr/share/mysql/charsets
default-character-set=utf8

[myisamchk]
character-sets-dir=/usr/share/mysql/charsets

[myisampack]
character-sets-dir=/usr/share/mysql/charsets

# use [safe_mysqld] with mysql-3
[mysqld_safe]
err-log = /var/log/mysql/mysql.err

# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
[mysqld]
character-set-server = utf8
user = mysql
port = 3306
socket = /var/run/mysqld/mysqld.sock
pid-file = /var/run/mysqld/mysqld.pid
log-error = /var/log/mysql/mysqld.err
basedir = /usr
datadir = /var/lib/mysql
skip-external-locking
key_buffer = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
language = /usr/share/mysql/english

# security:
# using "localhost" in connects uses sockets by default
# skip-networking
#bind-address = 127.0.0.1
bind-address = 192.168.2.5


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 ..
-rw-rw---- 1 mysql mysql 5 Jul 15 14:12 mysqld.pid
srwxrwxrwx 1 mysql mysql 0 Jul 15 14:12 mysqld.sock


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

Quote:

Runlevel: default
syslog-ng [ started ]
vixie-cron [ started ]
ufw [ started ]
netmount [ started ]
ntpd [ started ]
clamd [ started ]
mysql [ started ]
sshd [ started ]
apache2 [ started ]
udev-postmount [ started ]
local [ started ]
Runlevel: boot
hwclock [ started ]
modules [ started ]
fsck [ started ]
root [ started ]
mtab [ started ]
localmount [ started ]
sysctl [ started ]
bootmisc [ started ]
procfs [ started ]
net.lo [ started ]
termencoding [ started ]
urandom [ started ]
wicd [ started ]
swap [ started ]
keymaps [ started ]
hostname [ started ]
Runlevel: shutdown
savecache [ stopped ]
killprocs [ stopped ]
mount-ro [ stopped ]
Runlevel: sysinit
dmesg [ started ]
udev [ started ]
devfs [ started ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed
udev-mount [ started ]
dbus [ started ]
Dynamic Runlevel: manual



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.
Back to top
View user's profile Send private message
oldiest
n00b
n00b


Joined: 03 Jul 2012
Posts: 9
Location: Indonesia

PostPosted: Tue Jul 17, 2012 6:01 am    Post subject: Reply with quote

Remove WICD init from default ... and add to boot ..
# eselect rc delete wicd default
# eselect rc add wicd boot

Add reboot the computer ...
# reboot
Back to top
View user's profile Send private message
nomadicME
n00b
n00b


Joined: 24 Mar 2012
Posts: 46

PostPosted: Tue Jul 17, 2012 6:43 am    Post subject: Reply with quote

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 .
drwxr-xr-x 6 root root 4096 Nov 8 2011 ..
lrwxrwxrwx 1 root root 20 Nov 12 2011 bootmisc -> /etc/init.d/bootmisc
lrwxrwxrwx 1 root root 16 Nov 12 2011 fsck -> /etc/init.d/fsck
lrwxrwxrwx 1 root root 20 Nov 12 2011 hostname -> /etc/init.d/hostname
lrwxrwxrwx 1 root root 19 Nov 12 2011 hwclock -> /etc/init.d/hwclock
lrwxrwxrwx 1 root root 19 Nov 12 2011 keymaps -> /etc/init.d/keymaps
lrwxrwxrwx 1 root root 22 Nov 12 2011 localmount -> /etc/init.d/localmount
lrwxrwxrwx 1 root root 19 Nov 12 2011 modules -> /etc/init.d/modules
lrwxrwxrwx 1 root root 16 Nov 12 2011 mtab -> /etc/init.d/mtab
lrwxrwxrwx 1 root root 18 Nov 12 2011 net.lo -> /etc/init.d/net.lo
lrwxrwxrwx 1 root root 18 Nov 12 2011 procfs -> /etc/init.d/procfs
lrwxrwxrwx 1 root root 16 Nov 12 2011 root -> /etc/init.d/root
lrwxrwxrwx 1 root root 16 Nov 12 2011 swap -> /etc/init.d/swap
lrwxrwxrwx 1 root root 21 Mar 23 07:53 swapfiles -> /etc/init.d/swapfiles
lrwxrwxrwx 1 root root 18 Nov 12 2011 sysctl -> /etc/init.d/sysctl
lrwxrwxrwx 1 root root 24 Nov 12 2011 termencoding -> /etc/init.d/termencoding
lrwxrwxrwx 1 root root 19 Nov 12 2011 urandom -> /etc/init.d/urandom
lrwxrwxrwx 1 root root 16 Jan 24 15:57 wicd -> /etc/init.d/wicd

$ ls /etc/runlevels/default
total 8
drwxr-xr-x 2 root root 4096 Mar 29 19:18 .
drwxr-xr-x 6 root root 4096 Nov 8 2011 ..
lrwxrwxrwx 1 root root 19 Nov 18 2011 anacron -> /etc/init.d/anacron
lrwxrwxrwx 1 root root 19 Feb 7 23:37 apache2 -> /etc/init.d/apache2
lrwxrwxrwx 1 root root 15 Nov 17 2011 atd -> /etc/init.d/atd
lrwxrwxrwx 1 root root 17 Nov 18 2011 clamd -> /etc/init.d/clamd
lrwxrwxrwx 1 root root 22 Nov 17 2011 consolekit -> /etc/init.d/consolekit
lrwxrwxrwx 1 root root 16 Dec 7 2011 dbus -> /etc/init.d/dbus
lrwxrwxrwx 1 root root 17 Nov 12 2011 local -> /etc/init.d/local
lrwxrwxrwx 1 root root 17 Mar 29 01:46 mysql -> /etc/init.d/mysql
lrwxrwxrwx 1 root root 24 Dec 21 2011 mytv_backend -> /etc/init.d/mytv_backend
lrwxrwxrwx 1 root root 20 Nov 12 2011 netmount -> /etc/init.d/netmount
lrwxrwxrwx 1 root root 16 Nov 18 2011 ntpd -> /etc/init.d/ntpd
lrwxrwxrwx 1 root root 26 Feb 9 22:02 postgresql-9.1 -> /etc/init.d/postgresql-9.1
lrwxrwxrwx 1 root root 16 Nov 12 2011 sshd -> /etc/init.d/sshd
lrwxrwxrwx 1 root root 26 Nov 12 2011 udev-postmount -> /etc/init.d/udev-postmount
lrwxrwxrwx 1 root root 15 Jan 30 13:56 ufw -> /etc/init.d/ufw
lrwxrwxrwx 1 root root 22 Nov 18 2011 vixie-cron -> /etc/init.d/vixie-cron
lrwxrwxrwx 1 root root 27 Dec 4 2011 wakeonlanconfig -> /etc/init.d/wakeonlanconfig
lrwxrwxrwx 1 root root 15 Nov 14 2011 xdm -> /etc/init.d/xdm
Back to top
View user's profile Send private message
oldiest
n00b
n00b


Joined: 03 Jul 2012
Posts: 9
Location: Indonesia

PostPosted: Tue Jul 17, 2012 9:47 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
nomadicME
n00b
n00b


Joined: 24 Mar 2012
Posts: 46

PostPosted: Tue Jul 17, 2012 5:01 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum