Error 10061: connect to MySQL server failed
Nem rég futottam bele ebbe a problémába, de gyors megoldást találtam rá! Azért még se legyen szükségünk rengeteg hiba felderítésre!
Megoldás nálam ez volt:
bővebb leírás: https://help.ubuntu.com/community/ApacheMySQLPHP
After installing MySQL – bekezdésnél volt a megoldás!
Set mysql bind addressBefore you can access the database from other computers in your network, you have to change its bind address. Note that this can be a security problem, because your database can be accessed by other computers than your own. Skip this step if the applications which require mysql are running on the same machine.
type:
$ sudo nano /etc/mysql/my.cnf
and change the line:
bind-address = localhost
to your own internal ip address e.g. 192.168.1.20
bind-address = 192.168.1.20
If your ip address is dynamic you can also comment out the bind-address line and it will default to your current ip.
If you try to connect without changing the bind-address you will recieve a „Can not connect to mysql error 10061”.
Szóval a my.cnf fájlt kell módosítanod! Terminál, és írd be az alábbi parancsot!
sudo nano /etc/mysql/my.cnf
Keresd meg az alábbi sort!
bind-address = localhost
Majd írd át a localhost-ot, ip-re, vagy csak kommenteld ki!
Mivel nálam lokális hálózatban kapcsolódik több gép, nálam csak kommnetelés lett a vége! Már nem jött a 10061-es hibakód!
Nálam így néz ki!
#bind-address = localhost
