Hiba: "A MySQL szerver eltűnt": A hibaüzenet kijavítása
A MySQL hiba 2006 "A MySQL szerver eltűnt" újra és újra megjelenik - különösen, ha adatbázisokat importál a MySQL-be. Van egy egyszerű megoldás a hibára. Itt található az összes lépés áttekintése.
Csak javítsa ki a MySQL hibát 2006 "A MySQL szerver eltűnt"
Ez a MySQL hiba olyan adatbázisok importálásakor jelentkezik, amelyek túl nagyok vagy a kapcsolat túl lassú a feltöltéshez. A hiba kijavításához csak módosítson két változót a MySQL konfigurációs fájlban.
- A Windows XAMPP alatt a konfigurációs fájlt alapértelmezés szerint a C: \ xampp \ mysql \ bin \ my.cnf könyvtárban találja.
- Ha ez a fájl nem létezik, akkor egyszerűen használhatja a
Kattintson a jobb gombbal> "Új"> "Szöveges dokumentum" létrehozására. - Egy másik gyakorlati tipp megmutatja, hogyan kell elmenteni a fájlt egy új fájlkiterjesztéssel (.cnf).
- Linuxon ez a fájl alapértelmezés szerint az /etc/mysql/my.cnf fájlban található
Ebben a fájlban magasabb értékeket ír be a következő változókra:
- wait_timeout = 60 Itt adja meg a kívánt időtúllépést másodpercben - ha még mindig túl alacsony, egyszerűen tovább növelheti.
- max_allowed_packet = 100M Ez a változó határozza meg a feltöltés maximális csomagméretét.
Most állítsa fel e változó értékét úgy, hogy nagyobb legyen, mint az importálandó adatbázis fájlmérete. - Végül indítsa újra a MySQL-t - a hiba többé nem fordulhat elő
- Fontos: az élő rendszereken utána vissza kell állítani a megváltozott változókat az alapértelmezett értékre, mivel ezek valószínűleg biztonsági rést jelentenek a támadók számára.
A következő cikkben megmutatjuk, hogyan működik az adatbázisok importálása a MySQL-be a phpMyAdmin eszközzel.