Not sure what caused this (maybe the update to Squeeze), buthen I re-boot the Debian Squeeze server I get the following error(s) Code: Starting DNS server: mydnsmydns[1395]: Error connecting to MySQL server at localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (errno=2) Starting MySQL database server: mysqld . .. .. .. .. startpar: service(s) returned failure: mydns ... failed! I need to login after this and start the mydns by hand. Code: /etc/init.d/mydns start Anyone here who might know what could cause this?
Looks like 'mydns' is started before your 'mysql' server and it depends on mysql so that's why it's failing to start on boot. anyhow, can you post the output of: Code: # ls -la /etc/rc3.d/ | grep S thanks,
Hi, Re: Looks like 'mydns' is started before your 'mysql' server .. Yes. Thats what it looks like.. Anyway. Here is the requested output. Code: host:~# ls -la /etc/rc3.d/ | grep S lrwxrwxrwx 1 root root 18 May 21 16:40 S01bootlogs -> ../init.d/bootlogs lrwxrwxrwx 1 root root 31 May 21 16:40 S01xe-linux-distribution -> ../init.d/xe-linux-distribution lrwxrwxrwx 1 root root 17 May 21 16:40 S14portmap -> ../init.d/portmap lrwxrwxrwx 1 root root 20 May 21 16:40 S15nfs-common -> ../init.d/nfs-common lrwxrwxrwx 1 root root 13 May 21 16:40 S17fam -> ../init.d/fam lrwxrwxrwx 1 root root 19 May 21 16:40 S17mailgraph -> ../init.d/mailgraph lrwxrwxrwx 1 root root 17 May 21 16:40 S17rsyslog -> ../init.d/rsyslog lrwxrwxrwx 1 root root 19 May 21 16:40 S17saslauthd -> ../init.d/saslauthd lrwxrwxrwx 1 root root 14 May 26 14:18 S17sudo -> ../init.d/sudo lrwxrwxrwx 1 root root 17 May 21 16:40 S18apache2 -> ../init.d/apache2 lrwxrwxrwx 1 root root 16 Sep 16 2010 S19amavis -> ../init.d/amavis lrwxrwxrwx 1 root root 13 May 21 16:40 S19atd -> ../init.d/atd lrwxrwxrwx 1 root root 23 May 21 16:40 S19clamav-daemon -> ../init.d/clamav-daemon lrwxrwxrwx 1 root root 28 May 21 16:40 S19courier-authdaemon -> ../init.d/courier-authdaemon lrwxrwxrwx 1 root root 22 May 21 16:40 S19courier-imap -> ../init.d/courier-imap lrwxrwxrwx 1 root root 26 May 21 16:40 S19courier-imap-ssl -> ../init.d/courier-imap-ssl lrwxrwxrwx 1 root root 21 May 21 16:40 S19courier-pop -> ../init.d/courier-pop lrwxrwxrwx 1 root root 25 May 21 16:40 S19courier-pop-ssl -> ../init.d/courier-pop-ssl lrwxrwxrwx 1 root root 14 May 21 16:40 S19cron -> ../init.d/cron lrwxrwxrwx 1 root root 14 May 21 16:40 S19dbus -> ../init.d/dbus lrwxrwxrwx 1 root root 18 May 21 16:40 S19fail2ban -> ../init.d/fail2ban lrwxrwxrwx 1 root root 15 May 21 16:40 S19mydns -> ../init.d/mydns lrwxrwxrwx 1 root root 15 Sep 16 2010 S19mysql -> ../init.d/mysql lrwxrwxrwx 1 root root 23 May 21 16:40 S19mysql-ndb-mgm -> ../init.d/mysql-ndb-mgm lrwxrwxrwx 1 root root 13 May 21 16:40 S19ntp -> ../init.d/ntp lrwxrwxrwx 1 root root 23 May 21 16:40 S19openbsd-inetd -> ../init.d/openbsd-inetd lrwxrwxrwx 1 root root 18 Oct 1 2010 S19postgrey -> ../init.d/postgrey lrwxrwxrwx 1 root root 18 May 21 16:40 S19quotarpc -> ../init.d/quotarpc lrwxrwxrwx 1 root root 22 Sep 16 2010 S19spamassassin -> ../init.d/spamassassin lrwxrwxrwx 1 root root 13 May 21 16:40 S19ssh -> ../init.d/ssh lrwxrwxrwx 1 root root 16 May 21 16:40 S19webmin -> ../init.d/webmin lrwxrwxrwx 1 root root 26 Sep 16 2010 S20clamav-freshclam -> ../init.d/clamav-freshclam lrwxrwxrwx 1 root root 15 Sep 16 2010 S20exim4 -> ../init.d/exim4 lrwxrwxrwx 1 root root 19 May 21 16:40 S20mysql-ndb -> ../init.d/mysql-ndb lrwxrwxrwx 1 root root 17 Sep 16 2010 S20postfix -> ../init.d/postfix lrwxrwxrwx 1 root root 25 Sep 16 2010 S20pure-ftpd-mysql -> ../init.d/pure-ftpd-mysql lrwxrwxrwx 1 root root 20 May 21 16:40 S21munin-node -> ../init.d/munin-node lrwxrwxrwx 1 root root 18 May 21 16:40 S21rc.local -> ../init.d/rc.local lrwxrwxrwx 1 root root 19 May 21 16:40 S21rmnologin -> ../init.d/rmnologin lrwxrwxrwx 1 root root 23 May 21 16:40 S21stop-bootlogd -> ../init.d/stop-bootlogd
yes, there's the problem. a quick fix is to rename the S19mydns symlink to something like S99mydns for example.
Done as you suggested, but still same problem. Code: Starting DNS server: mydnsmydns[1438]: Error connecting to MySQL server at localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (errno=2) .. .. .. startpar: service(s) returned failure: mydns ... failed! Code: host:~# ls -la /etc/rc3.d/ | grep S lrwxrwxrwx 1 root root 18 May 21 16:40 S01bootlogs -> ../init.d/bootlogs lrwxrwxrwx 1 root root 31 May 21 16:40 S01xe-linux-distribution -> ../init.d/xe-linux-distribution lrwxrwxrwx 1 root root 17 May 21 16:40 S14portmap -> ../init.d/portmap lrwxrwxrwx 1 root root 20 May 21 16:40 S15nfs-common -> ../init.d/nfs-common lrwxrwxrwx 1 root root 13 May 21 16:40 S17fam -> ../init.d/fam lrwxrwxrwx 1 root root 19 May 21 16:40 S17mailgraph -> ../init.d/mailgraph lrwxrwxrwx 1 root root 17 May 21 16:40 S17rsyslog -> ../init.d/rsyslog lrwxrwxrwx 1 root root 19 May 21 16:40 S17saslauthd -> ../init.d/saslauthd lrwxrwxrwx 1 root root 14 May 26 14:18 S17sudo -> ../init.d/sudo lrwxrwxrwx 1 root root 17 May 21 16:40 S18apache2 -> ../init.d/apache2 lrwxrwxrwx 1 root root 16 Sep 16 2010 S19amavis -> ../init.d/amavis lrwxrwxrwx 1 root root 13 May 21 16:40 S19atd -> ../init.d/atd lrwxrwxrwx 1 root root 23 May 21 16:40 S19clamav-daemon -> ../init.d/clamav-daemon lrwxrwxrwx 1 root root 28 May 21 16:40 S19courier-authdaemon -> ../init.d/courier-authdaemon lrwxrwxrwx 1 root root 22 May 21 16:40 S19courier-imap -> ../init.d/courier-imap lrwxrwxrwx 1 root root 26 May 21 16:40 S19courier-imap-ssl -> ../init.d/courier-imap-ssl lrwxrwxrwx 1 root root 21 May 21 16:40 S19courier-pop -> ../init.d/courier-pop lrwxrwxrwx 1 root root 25 May 21 16:40 S19courier-pop-ssl -> ../init.d/courier-pop-ssl lrwxrwxrwx 1 root root 14 May 21 16:40 S19cron -> ../init.d/cron lrwxrwxrwx 1 root root 14 May 21 16:40 S19dbus -> ../init.d/dbus lrwxrwxrwx 1 root root 18 May 21 16:40 S19fail2ban -> ../init.d/fail2ban lrwxrwxrwx 1 root root 15 Sep 16 2010 S19mysql -> ../init.d/mysql lrwxrwxrwx 1 root root 23 May 21 16:40 S19mysql-ndb-mgm -> ../init.d/mysql-ndb-mgm lrwxrwxrwx 1 root root 13 May 21 16:40 S19ntp -> ../init.d/ntp lrwxrwxrwx 1 root root 23 May 21 16:40 S19openbsd-inetd -> ../init.d/openbsd-inetd lrwxrwxrwx 1 root root 18 Oct 1 2010 S19postgrey -> ../init.d/postgrey lrwxrwxrwx 1 root root 18 May 21 16:40 S19quotarpc -> ../init.d/quotarpc lrwxrwxrwx 1 root root 22 Sep 16 2010 S19spamassassin -> ../init.d/spamassassin lrwxrwxrwx 1 root root 13 May 21 16:40 S19ssh -> ../init.d/ssh lrwxrwxrwx 1 root root 16 May 21 16:40 S19webmin -> ../init.d/webmin lrwxrwxrwx 1 root root 26 Sep 16 2010 S20clamav-freshclam -> ../init.d/clamav-freshclam lrwxrwxrwx 1 root root 15 Sep 16 2010 S20exim4 -> ../init.d/exim4 lrwxrwxrwx 1 root root 19 May 21 16:40 S20mysql-ndb -> ../init.d/mysql-ndb lrwxrwxrwx 1 root root 17 Sep 16 2010 S20postfix -> ../init.d/postfix lrwxrwxrwx 1 root root 25 Sep 16 2010 S20pure-ftpd-mysql -> ../init.d/pure-ftpd-mysql lrwxrwxrwx 1 root root 20 May 21 16:40 S21munin-node -> ../init.d/munin-node lrwxrwxrwx 1 root root 18 May 21 16:40 S21rc.local -> ../init.d/rc.local lrwxrwxrwx 1 root root 19 May 21 16:40 S21rmnologin -> ../init.d/rmnologin lrwxrwxrwx 1 root root 23 May 21 16:40 S21stop-bootlogd -> ../init.d/stop-bootlogd lrwxrwxrwx 1 root root 17 Jul 10 13:18 S99mydns -> /etc/init.d/mydns host:~#
when mysql server is started is there an unix socket mysqld.sock in the location specified by the error /var/run/mysqld/mysqld.sock ?
At the moment I do not know (and can not reboot the server again...) I will reboot again tonight, and report back. Thank you for your help.
My misstake Code: host:/var/run/mysqld# ls -l total 4 -rw-rw---- 1 mysql mysql 5 Jul 10 13:23 mysqld.pid srwxrwxrwx 1 mysql mysql 0 Jul 10 13:23 mysqld.sock And Code: host:/var/run/mysqld# ls mysqld.pid mysqld.sock host:/var/run/mysqld# So yes... mysqld.sock does exists
that's strange ... mysqld seems that is starting fine try also runing mysql_upgrade script and see if that's working , it should fix the tables after upgrading