Feil "MySQL-serveren er borte": Slik løser du feilmeldingen
MySQL Error 2006 "MySQL server has forsvunnet" oppstår igjen og igjen - spesielt når du importerer databaser til MySQL. Det er en enkel løsning på feilen. Du kan finne en oversikt over alle trinnene her.
Bare rett MySQL Error 2006 "MySQL server has forsvunnet"
Denne MySQL-feilen oppstår når du importerer databaser som enten er for store eller tilkoblingen er for treg for opplasting. For å fikse feilen, bare endre to variabler i MySQL-konfigurasjonsfilen.
- Under XAMPP i Windows finner du konfigurasjonsfilen i C: \ xampp \ mysql \ bin \ my.cnf som standard
- Hvis denne filen ikke eksisterer, kan du ganske enkelt bruke a
Høyreklikk> "Ny"> Opprett "Tekstdokument". - Et annet praktisk tips vil fortelle deg hvordan du lagrer filen med en ny filtype (.cnf).
- På Linux ligger denne filen som standard på /etc/mysql/my.cnf
I denne filen oppgir du nå høyere verdier for følgende variabler:
- wait_timeout = 60 Her angir du ønsket timeout på sekunder - hvis den fremdeles er for lav, kan du ganske enkelt øke den ytterligere.
- max_allowed_packet = 100M Denne variabelen bestemmer maksimal pakkestørrelse for opplastningen.
Sett nå verdien til denne variabelen oppover, slik at den er større enn filstørrelsen til databasen som skal importeres. - Endelig start MySQL på nytt - feilen skal ikke lenger oppstå
- Viktig: på live-systemer, bør du tilbakestille endrede variabler til standardverdiene i etterkant, da disse muligens kan representere et sikkerhetshull for angripere.
I den neste artikkelen vil vi vise deg hvordan import av databaser til MySQL ved hjelp av phpMyAdmin-verktøyet fungerer.