Re: MySQL server socket problem
"John Reid" <[email protected]> Wed, 14 Dec 2011 16:57:36 +1100 (EST)
| Newsgroups | gmane.org.user-groups.linux.new-zealand.general |
|---|---|
| Message-ID | <[email protected]> |
Steve cat /etc/mysql/my.conf | grep socket gives # Remember to edit /etc/mysql/debian.cnf when changing the socket locatio= n. socket =3D /var/run/mysqld/mysqld.sock socket =3D /var/run/mysqld/mysqld.sock socket =3D /var/run/mysqld/mysqld.sock This same line also appears twice in /etc/mysql/debian.cnf Nick mysqld is not running Robin Good point. I did a restart and got the following in syslog Dec 14 16:46:39 debian mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql Dec 14 16:46:39 debian mysqld: 111214 16:46:39 [Note] Plugin 'FEDERATED' is disabled. Dec 14 16:46:39 debian mysqld: 111214 16:46:39 InnoDB: Started; log sequence number 0 44233 Dec 14 16:46:39 debian mysqld: 111214 16:46:39 [ERROR] /usr/sbin/mysqld: unknown variable 'lc-messages-dir=3D/usr/share/mysql' Dec 14 16:46:39 debian mysqld: 111214 16:46:39 [ERROR] Aborting Dec 14 16:46:39 debian mysqld: Dec 14 16:46:39 debian mysqld: 111214 16:46:39 InnoDB: Starting shutdown= ... Dec 14 16:46:45 debian mysqld: 111214 16:46:45 InnoDB: Shutdown completed; log sequence number 0 44233 Dec 14 16:46:45 debian mysqld: 111214 16:46:45 [Note] /usr/sbin/mysqld: Shutdown complete Dec 14 16:46:45 debian mysqld: Dec 14 16:46:45 debian mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended Dec 14 16:46:54 debian /etc/init.d/mysql[3008]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=3D/etc/mysql/debian.cnf ping' result= ed in Dec 14 16:46:54 debian /etc/init.d/mysql[3008]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed Dec 14 16:46:54 debian /etc/init.d/mysql[3008]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Dec 14 16:46:54 debian /etc/init.d/mysql[3008]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! Dec 14 16:46:54 debian /etc/init.d/mysql[3008]: This suggests that 'unknown variable 'lc-messages-dir=3D/usr/share/mysql'= is the source of the problem. But what can I do about it? > John Reid schreef op wo 14-12-2011 om 15:03 [+1100]: >> Having briefly run MySQL successfully from a C program, the next time >> I >> booted up mysqld failed >> >> Relevant syslog info was: >> >> error: 'Can't connect to local MySQL server through socket >> '/var/run/mysqld/mysqld.sock' (2)' >> Check that mysqld is running and that the socket: >> '/var/run/mysqld/mysqld.sock' exists! >> >> (mysqld.sock does not exist) > > This is saying that something is trying to connect to mysqld and > failing. Which is correct if starting mysqld failed. I think the > relevant syslog info might be before this. > > I don't know what distro you're on, so I'm going to assume Debian or > Debian-like. > > What happens when you run 'sudo /etc/init.d/mysql restart'? > >> Checked this out on the Web and found >> >> This bug can be fixed by: >> 1) Adding a line that says >> include "/etc/bind/rndc.key"; >> to /etc/bind/named.conf >> and then >> 2) Making /etc/bind/rndc.key be owner root:bind mode 640 >> chown root:bind /etc/bind/rndc.key > > I'm 99% sure that's not going to do anything for you. In particular, it > seems to be talking about the bind nameserver, which you probably aren'= t > even running. > > Robin. > _______________________________________________ > NZLUG mailing list [email protected] > http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug > _______________________________________________ NZLUG mailing list [email protected] http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug