From: Reindl Harald Date: April 2 2011 4:50pm Subject: Re: Can't connect to MySQL server on '127.0.0.1' (111) List-Archive: http://lists.mysql.com/mysql/224762 Message-Id: <4D9753DE.2020001@thelounge.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCF5CE2ACFDD0BFD13FFFB6B1" --------------enigCF5CE2ACFDD0BFD13FFFB6B1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Please "netstat --numeric-hosts --notrim --programs -u -t -l" In my first answer i forgot the -l Without we get active connections, but we want the listening tcp-services where somewhere must by mysqld the easiest test is however > [harry@srv-rhsoft:~]$ telnet 127.0.0.1 3306 > Trying 127.0.0.1... > Connected to 127.0.0.1. > Escape character is '^]'. > 5.5.10-log=EF=BF=BDK]qC7,t'=EF=BF=BD=EF=BF=BDa4~Agb949^QXmysql_native_p= assword if there is no connection we should find out why debug simply the web-app user on a local terminal to get error messages with more details as "failed" > [harry@srv-rhsoft:~]$ mysql -h 127.0.0.1 -u myuser -p > Enter password: > ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using = password: NO) this example says more as "failed" bceause we see that connection is possible but authentication fails Am 02.04.2011 18:21, schrieb xPol: > Reindl Harald wrote: >=20 >> please do not only post outputs, read them and try to understand >> before press send - "not all processes could be identified, non-owned >> process info will not be shown, you would have to be root to see it al= l." >> in the ouptput says that all afterwards is useless >> >> "netstat --numeric-hosts --notrim --programs -u -t -l" as ROOT on the >> machine where mysql is running! alterante: "telnet 127.0.0.1 3306" >=20 > sorry, i have re-enterd the command as root - here incuded >=20 >> >> "/mnt/etc/my.cnf" is really your active mysql-config? >> normally "/etc/my.cnf" is used, even if /etc/ is a own >> disk/partition you should never mount it as /mnt/etc/ >> and managing with symlinks - mount it directly to /etc >> >=20 > you're right, /mnt/etc/my.cnf is not my ususm cnf file I hd mounnted th= at=20 > file system to compare with /etc/my.cnf > They are the same, however.=20 >=20 > Here included also /etc/mysqlaccess.conf >=20 >> i would assume something like "skip-networking" in your >> config if connection fails >=20 > it is there, but commented out: > /etc/my.cnf:#skip-networking >=20 >> >> anyways this mysql-config ma contain some includes >> because the line "!include_dir /etc/mysql" >> > / > That dir contains: /etc/mysql/default_plugins.cnf=20 > its contents is here included >=20 > thank you > ----p >=20 > 1-----=20 > % =C2=B0 netstat --numeric-hosts --notrim --programs -u -t = =20 > ~ (18:09-Sat 2)=20 > Active Internet connections (w/o servers) > Proto Recv-Q Send-Q Local Address Foreign Address Sta= te =20 > PID/Program name =20 > tcp 0 0 10.121.243.241:60577 74.125.232.149:https =20 > ESTABLISHED 6252/firefox =20 > tcp 0 0 10.121.243.241:54207 74.125.232.114:www-http=20 > ESTABLISHED 6252/firefox =20 > tcp 0 0 10.121.243.241:49545 85.86.166.196:7168 =20 > TIME_WAIT - =20 > tcp 0 0 10.121.243.241:53173 74.125.232.150:https =20 > TIME_WAIT - =20 > tcp 0 0 127.0.0.1:50793 127.0.0.1:48856 =20 > ESTABLISHED 6752/npviewer.bin =20 > tcp 0 0 127.0.0.1:57336 127.0.0.1:48856 =20 > ESTABLISHED 6752/npviewer.bin =20 > tcp 0 0 10.121.243.241:39556 209.85.227.189:https =20 > ESTABLISHED 6252/firefox =20 > tcp 0 0 10.121.243.241:60576 74.125.232.149:https =20 > ESTABLISHED 6252/firefox =20 > tcp 0 0 10.121.243.241:39551 209.85.227.189:https =20 > TIME_WAIT - =20 > tcp 0 0 10.121.243.241:41089 83.233.30.55:ipsec-nat-t=20 > TIME_WAIT - =20 > tcp 0 0 10.121.243.241:39550 209.85.227.189:https =20 > TIME_WAIT - =20 > tcp 0 0 10.121.243.241:52758 83.51.48.124:44909 =20 > TIME_WAIT - =20 > tcp 0 0 127.0.0.1:52722 127.0.0.1:48856 =20 > ESTABLISHED 6752/npviewer.bin =20 > tcp 0 0 127.0.0.1:48856 127.0.0.1:52722 =20 > ESTABLISHED 6767/GoogleTalkPlug=20 > tcp 0 0 10.121.243.241:39555 209.85.227.189:https =20 > ESTABLISHED 6252/firefox =20 > tcp 0 0 10.121.243.241:35365 82.56.169.37:19907 =20 > TIME_WAIT - =20 > tcp 0 0 10.121.243.241:57283 80.91.229.10:nntp =20 > ESTABLISHED 12106/knodec10783.s=20 > tcp 0 0 10.121.243.241:44552 74.125.232.150:https =20 > ESTABLISHED 6252/firefox =20 > tcp 0 0 127.0.0.1:48856 127.0.0.1:50793 =20 > ESTABLISHED 6767/GoogleTalkPlug=20 > tcp 0 0 127.0.0.1:48856 127.0.0.1:57336 =20 > ESTABLISHED 6767/GoogleTalkPlug=20 >=20 > 2 ---- > (xpol) % =C2=B0 cat /etc/mysqlaccess.conf | grep -v "^#" = =20 > ~ (18:20-Sat 2)=20 >=20 >=20 > #$Param{'host'} =3D ''; > $Param{'user'} =3D 'nobody'; > $Param{'db'} =3D 'test'; > $Param{'password'} =3D 'foobar'; > $Param{'debug'} =3D 0; >=20 > if ($CMD) { > $Param{'superuser'} =3D 'root'; > $Param{'rhost'} =3D 'localhost'; > $Param{'spassword'} =3D ''; > $Param{'brief'} =3D 1; > } >=20 > if ($CGI) { > $Param{'superuser'} =3D 'root'; > $Param{'rhost'} =3D 'localhost'; > $Param{'spassword'} =3D ''; > $Param{'table'} =3D 1; > } >=20 > 1; #to make require happy >=20 > 3------ > (xpol) % =C2=B0 cat /etc/mysql/default_plugins.cnf = =20 > ~ (18:20-Sat 2)=20 > [server] > plugin-load=3Dblackhole=3Dha_blackhole.so > plugin-load=3Dfederated=3Dha_federated.so > plugin-load=3Darchive=3Dha_archive.so >=20 > ----- >=20 >=20 --=20 Mit besten Gr=C3=BC=C3=9Fen, Reindl Harald the lounge interactive design GmbH A-1060 Vienna, Hofm=C3=BChlgasse 17 CTO / software-development / cms-solutions p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40 icq: 154546673, http://www.thelounge.net/ --------------enigCF5CE2ACFDD0BFD13FFFB6B1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk2XU94ACgkQhmBjz394AnloHACeMsoiW45+5yKtcyaMCX7RDHXZ uN8An0lLYXahYdMftJ/Qx+1YGukpz5b2 =AdyC -----END PGP SIGNATURE----- --------------enigCF5CE2ACFDD0BFD13FFFB6B1--