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
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
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 usingSHOW 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
Controlla il tuo file my.cnf. imposta l'indirizzo di bind sull'effettivo indirizzo IP del server.
Dai un'occhiata al tuo file di log mysqld - c'è una buona probabilità che 'show status' blocchi MySQL per qualche motivo.
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! :)
perché ho votato in ribasso? Ho avuto una risposta legittima a questo problema esatto che è stato risolto !? – ethanpil
skip_networking interromperà tutte le connessioni socket al server database dall'esterno. Solo i server locali sarebbero in grado di connettersi. – Pradeep
E allora? Ha ancora risolto il problema per il mio caso, che non aveva nulla a che fare con l'accesso remoto. – ethanpil
L'aggiunta di skip-name-resolve
a my.cnf
ha risolto il problema per me.
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")
Se si utilizza Mac OS X e MySQL 5.6.6 o versioni successive, il valore predefinito di innodb_file_per_table
è stato modificato in ON
. L'impostazione innodb_file_per_table = OFF
potrebbe risolvere il tuo problema. Vedi Mysql 5.6 headaches on Mac OSX e http://bugs.mysql.com/bug.php?id=71960
Hai controllato il tuo file di registro? Potrebbe contenere alcune informazioni più descrittive sul problema. –
Un sacco di teorie su questo, ma mai un motivo definitivo. –