2009-04-20 11 views
17

In MySQL, come posso risolvere l'errore di seguito?Errore MySQL 2013

2013: Lost connection to MySQL server at 'reading authorization packet', system error: 0 
+0

Hai controllato il tuo file di registro? Potrebbe contenere alcune informazioni più descrittive sul problema. –

+1

Un sacco di teorie su questo, ma mai un motivo definitivo. –

risposta

12

Da documentation:

More rarely, it can happen when the client is attempting the initial connection to the server. In this case, if your connect_timeout value is set to only a few seconds, you may be able to resolve the problem by increasing it to ten seconds, perhaps more if you have a very long distance or slow connection. You can determine whether you are experiencing this more uncommon cause by using SHOW STATUS LIKE 'aborted_connections' . It will increase by one for each initial connection attempt that the server aborts. You may see “reading authorization packet” as part of the error message; if so, that also suggests that this is the solution that you need.

provare ad aumentare connect_timeout nel file my.cnf

0

Controlla il tuo file my.cnf. imposta l'indirizzo di bind sull'effettivo indirizzo IP del server.

0

Dai un'occhiata al tuo file di log mysqld - c'è una buona probabilità che 'show status' blocchi MySQL per qualche motivo.

1

Avevo anche questo problema. Per me la soluzione era quella di commentare la riga:

skip_networking 

ho semplicemente aggiunto il commento #, in questo modo:

#skip_networking 

E poi ho riavviato mysql ed è andato tutto bene!

Attenzione, questo disabiliterà tutte le possibilità di effettuare connessioni di rete a MySQL. Se stai usando solo come localhost, dovrebbe andare bene, ma per il resto, stai attento! :)

+0

perché ho votato in ribasso? Ho avuto una risposta legittima a questo problema esatto che è stato risolto !? – ethanpil

+5

skip_networking interromperà tutte le connessioni socket al server database dall'esterno. Solo i server locali sarebbero in grado di connettersi. – Pradeep

+2

E allora? Ha ancora risolto il problema per il mio caso, che non aveva nulla a che fare con l'accesso remoto. – ethanpil

4

L'aggiunta di skip-name-resolve a my.cnf ha risolto il problema per me.

3

Ho avuto questo stesso problema oggi e si è rivelato essere un problema con mysql 5.6. *. Dopo averlo disinstallato e installato 5.5.36, non ricevo più questo errore.

EDIT: In un altro computer, mi è stato sempre questo errore molto consistente fino a quando ho impostato questo in my.cnf:

[mysqld] 
max_allowed_packet = 32M 

Beh, tecnicamente, il mio errore era leggermente diverso:

_mysql_exceptions.OperationalError: (2013, "Lost connection to MySQL server at 'sending authentication information', system error: 32")

Problemi correlati