[TriLUG] mysql weirdness
David Rasch
rasch at raschnet.com
Tue Nov 1 09:42:03 EST 2005
Jeff,
the "Can't connect to MySQL..." error can mean many things, but the
difference between the working command and the failing command is
clearly the "-h hostname" piece.
I'd check that you find neither of these lines on your mysql server's
/etc/mysql/my.cnf:
skip-networking
bind-address=127.0.0.1
These are both security precautions included in many default MySQL
installations.
As for why it stopped working all of a sudden? It's possible you did an
upgrade to the system, and the config file got updated to make one of
these changes.
-David
Jeff The Riffer wrote:
>
> I have a server with a monthly cron job that rotates a large mysql
> database (syslog records). It's been working fine for months. Than
> sometime in August it stopped working.I didn't notice until today
> thanks to not having previously been forwarding e-mail from root.
> (woops)
>
> Ok, so now the script does a mysqldump on an archive database, purges
> the database, copies the existing syslog data to the archive database
> and then deletes the archived data from the live DB.
>
> Now everyone one of these steps generates the same error:
>
> ERROR 2003: Can't connect to MySQL server on 'hostname' (110)
>
> Which is quite strange, since mysqld is running, I can interactively
> connect and everything is running normally as far as I can tell. It
> takes a rather long time for the error to pop-up but I can reproduce
> it from the command-line.
>
> So I'm stumped. Why would:
>
> mysqldump -a -B syslogarchiveDB -C -e -F -h hostname -u root
> -ppassword > syslog-dumps/syslog.0
>
> give an error but:
>
> mysql -u root -ppassword
>
> work fine? *scratches head*
>
> Any suggestions? If mysqld has a debug mode I'd like to enable it.
>
> ####################==============----
> ----==============####################
> # riffer at vaxer.net - Jeff The Riffer - Drifter... - Homo
> Postmortemus #
> # Disclaimer: I am not a number, I am a free man, and my thoughts are
> my own. #
> # GCS$ d-- H++ s:++ !g p+ au0 a31 w+ v?(*) C++ UA P? L 3 E---- N++ K-
> W-- M+ V#
> # po--- Y+ t+ 5+ !j R G' tv b+ D++ B--- e+ u--- h--- f+ r+++ n-
> y+++* #
More information about the TriLUG
mailing list