Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111)

Heute ist Stammtischzeit:
Jeden Donnerstag 20:30 Uhr hier im Chat.
Wer Lust hat, kann sich gerne beteiligen. ;)
  • Ich habe drei MySQL Datenbanken auf unterschiedlichen Servern.
    Der raspberry kann auf die Datenbank lokal und im LAN zugreifen, nicht aber auf die beim Provider.
    Das NAS Laufwerk kann aber ohne Probleme auf die Datenbank im WAN zugreifen.

    Evtl. habe ich etwas kaputt-konfiguriert, als ich das WLAN eingerichtet habe.
    Ich bin für jede Hilfe dankbar, nach dem ich den ganzen morgen bei google unterwegs war.

    Server Beschreibung
    192.168.178.61 Raspbery Pi (über WLAN und LAN)
    192.168.178.20 NAS von Synology (Linux)
    xxx.xxx.xxx.xxx Provider

    NAS -> Provider o.k.
    NAS -> Raspberry o.k.
    Raspberry -> localhost o.k.
    Raspberry -> NAS o.k.
    Raspberry -> Provider FEHLER: Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111)

    NAS -> Provider:
    Pandora> /usr/syno/mysql/bin/mysqladmin -umysqluser -p -h xxx.xxx.xxx.xxx ping
    Enter password:
    mysqld is alive

    Raspberry -> NAS:
    pi@raspberrypi ~/avrio $ mysqladmin -umysqluser -p -h 192.168.178.20 ping
    Enter password:
    mysqld is alive

    Raspberry -> Provider:
    pi@raspberrypi ~/avrio $ mysqladmin -umysqluser -p -h xxx.xxx.xxx.xxx ping
    Enter password:
    mysqladmin: connect to server at 'xxx.xxx.xxx.xxx' failed
    error: 'Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111)'
    Check that mysqld is running on xxx.xxx.xxx.xxx and that the port is 3306.
    You can check this by doing 'telnet xxx.xxx.xxx.xxx 3306'


    pi@raspberrypi ~/avrio $ ifconfig
    eth0 Link encap:Ethernet HWaddr b8:27:eb:58:f3:ea
    inet addr:192.168.178.60 Bcast:192.168.178.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:8570 errors:0 dropped:1 overruns:0 frame:0
    TX packets:2078 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:742223 (724.8 KiB) TX bytes:304446 (297.3 KiB)

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:19 errors:0 dropped:0 overruns:0 frame:0
    TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:5830 (5.6 KiB) TX bytes:5830 (5.6 KiB)

    wlan0 Link encap:Ethernet HWaddr 80:1f:02:87:60:71
    inet addr:192.168.178.61 Bcast:192.168.178.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:20093 errors:0 dropped:23709 overruns:0 frame:0
    TX packets:77 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:3343134 (3.1 MiB) TX bytes:8698 (8.4 KiB)


    pi@raspberrypi ~/avrio $ route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    default fritzi 0.0.0.0 UG 0 0 0 eth0
    192.168.178.0 * 255.255.255.0 U 0 0 0 eth0
    192.168.178.0 * 255.255.255.0 U 0 0 0 wlan0


    /etc/network/interfaces
    auto lo

    iface lo inet loopback
    iface eth0 inet static
    address 192.168.178.60
    netmask 255.255.255.0
    gateway 192.168.178.1

    allow-hotplug wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet static
    address 192.168.178.61
    netmask 255.255.255.0
    gateway 192.168.178.1
    dns-nameservers 192.168.178.1


    /etc/mysql/my.cnf
    [mysqld]
    #
    # * Basic Settings
    #
    user = mysql
    pid-file = /var/run/mysqld/mysqld.pid
    socket = /var/run/mysqld/mysqld.sock
    port = 3306
    basedir = /usr
    datadir = /var/lib/mysql
    tmpdir = /tmp
    lc-messages-dir = /usr/share/mysql
    skip-external-locking
    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    # bind-address = 127.0.0.1

    while (!sleep()) {sheep++};

  • Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (111)? Schau mal ob du hier fündig wirst!

  • Hallo,

    Unterstützt dein Provider denn MySql von anderen IPs?
    Ich bin bei 1&1 der macht das nicht.
    Ich wollte Daten, um den Raspi zu schonen, auf eine Datenbank bei 1&1 schreiben.
    Irgendwo im Kleingedruckten steht dann aber, das 1&1 es aus Sicherheitsgründen nicht zulässt!

    Ist der Poort 80 evtl nur für das NAS freigegeben?

    cu pfaelzer

  • Das war genau der Grund, warum ich mittlerweile bei speicherhosting.de bin.
    Dort kann man wesentlich mehr einstellen und es gibt eine Menge Software, die man per Mausklick installieren kann.

    Ich habe über MySQL auf dem NAS Zugriff auf die Datenbank bei Provider.
    Unter Windows kann ich mit HeidiSQL auch komplett auf alle Datenbanken zugreifen.

    Es muss also an der Konfiguration des Raspberry liegen.

    Gruß,
    Thomas

    while (!sleep()) {sheep++};

  • Du hast ETH0 ind Wlan0 im gleichen IP-Netz. Dadurch hast Du keinen eindeutigen Weg zu Deinem Default-Gateway und damit ins Internet sondern 2 gleichberechtigte

    192.168.178.0 * 255.255.255.0 U 0 0 0 eth0
    192.168.178.0 * 255.255.255.0 U 0 0 0 wlan0

    von denen aber warscheinlich nur einer funktioniert.

    Das klappt nicht.

    Einmal editiert, zuletzt von orb (29. März 2013 um 17:12)

  • Wennn ich das LAN abklemme und nur über WLAN gehe, sieht route besser aus.
    ABER: ein ping im LAN ist o.k. aber für WAN kommt "Packet filtered".
    Auf dem NAS funktioniert dies problemlos.

    Raspberry
    pi@raspberrypi ~ $ route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    default fritzi 0.0.0.0 UG 0 0 0 wlan0
    192.168.178.0 * 255.255.255.0 U 0 0 0 wlan0

    pi@raspberrypi ~ $ ping pandora
    PING pandora (192.168.178.20) 56(84) bytes of data.
    64 bytes from pandora (192.168.178.20): icmp_req=1 ttl=64 time=4.37 ms
    64 bytes from pandora (192.168.178.20): icmp_req=2 ttl=64 time=7.41 ms
    64 bytes from pandora (192.168.178.20): icmp_req=3 ttl=64 time=6.79 ms
    --- pandora ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2003ms
    rtt min/avg/max/mdev = 4.372/6.195/7.417/1.317 ms

    pi@raspberrypi ~ $ ping http://www.google.com
    PING http://www.google.com (173.194.44.51) 56(84) bytes of data.
    From 2.171.32.160 icmp_seq=1 Packet filtered
    From 2.171.32.160 icmp_seq=2 Packet filtered
    From 2.171.32.160 icmp_seq=3 Packet filtered
    --- http://www.google.com ping statistics ---
    3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 10032ms

    ---------------------------------------------------------------------------------
    NAS

    Pandora> route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.178.0 * 255.255.255.0 U 0 0 0 eth0
    default fritzi 0.0.0.0 UG 0 0 0 eth0

    Pandora> ping 192.168.178.61
    PING 192.168.178.61 (192.168.178.61): 56 data bytes
    64 bytes from 192.168.178.61: seq=0 ttl=64 time=54.364 ms
    64 bytes from 192.168.178.61: seq=1 ttl=64 time=73.447 ms
    --- 192.168.178.61 ping statistics ---
    2 packets transmitted, 2 packets received, 0% packet loss
    round-trip min/avg/max = 54.364/63.905/73.447 ms

    Pandora> ping http://www.google.com
    PING http://www.google.com (173.194.69.105): 56 data bytes
    64 bytes from 173.194.69.105: seq=0 ttl=41 time=49.007 ms
    64 bytes from 173.194.69.105: seq=1 ttl=41 time=51.738 ms
    --- http://www.google.com ping statistics ---
    2 packets transmitted, 2 packets received, 0% packet loss
    round-trip min/avg/max = 49.007/50.372/51.738 ms

    while (!sleep()) {sheep++};

  • pi@raspberrypi ~ $ traceroute google.de
    traceroute to google.de (173.194.44.56), 30 hops max, 60 byte packets
    1 fritzi (192.168.178.1) 9.457 ms 59.708 ms 59.560 ms
    2 2.171.32.160 (2.171.32.160) 84.852 ms !X 89.107 ms !X 107.303 ms !X


    Bewußt habe ich keine firewall eingerichtet (falls das nicht über irgendein Paket erfolgt ist).

    while (!sleep()) {sheep++};

  • Aaaahhh - ich könnte mich treten.

    Da wir am Internet via HPA mit 10GB Volumen pro Monat hängen, habe ich einen Filter/Kindersicherng in der Fritzbox eingestellt.
    Meine drei Kinder schaffen locker 1GB pro Tag, so das am Ende des Volumens noch viel Monat übrig ist.

    Jetzt funktioniert traceroute, oing und mysql

    pi@raspberrypi ~ $ traceroute google.de
    traceroute to google.de (173.194.39.23), 30 hops max, 60 byte packets
    1 fritzi (192.168.178.1) 9.280 ms 13.274 ms 17.511 ms
    2 * * *
    3 * * *
    4 * * *
    5 * * *
    6 * * *
    7 *
    pi@raspberrypi ~ $ ping http://www.google.com
    PING http://www.google.com (173.194.44.48) 56(84) bytes of data.
    64 bytes from muc03s08-in-f16.1e100.net (173.194.44.48): icmp_req=1 ttl=48 time=47.1 ms
    64 bytes from muc03s08-in-f16.1e100.net (173.194.44.48): icmp_req=2 ttl=48 time=62.4 ms
    64 bytes from muc03s08-in-f16.1e100.net (173.194.44.48): icmp_req=3 ttl=48 time=127 ms

    --- http://www.google.com ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2003ms
    rtt min/avg/max/mdev = 47.146/78.981/127.393/34.795 ms
    pi@raspberrypi ~ $

    pi@raspberrypi ~ $ mysqladmin -umysqluser -pmysqlpw -h xxx.xxx.xxx.xxx ping
    mysqld is alive


    Danke orb.

    while (!sleep()) {sheep++};

Jetzt mitmachen!

Du hast noch kein Benutzerkonto auf unserer Seite? Registriere dich kostenlos und nimm an unserer Community teil!