当前位置:首页 > 开发 > 数据库 > 正文

ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading authorization pa

发表于: 2014-10-21   作者:blackproof   来源:转载   浏览次数:
摘要: Discussion This error can happen when the client is attempting an initial connection to the server. If your connect_timeout value is set to only a few seconds, you may be able to resolve th

Discussion

This error can happen when the client is attempting an initial connection to the server. If your connect_timeout value is set to only a few seconds, you may be able to resolve the problem by increasing it.

Solution

Before increasing the value of connect_timeout, first determine its current value. This can be done by executing the following SQL statement:

SHOW VARIABLES LIKE 'connect_timeout';

+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| connect_timeout |  2    | 
+-----------------+-------+

Normally, setting this variable to ten seconds would be sufficient. You might want to set it to more than ten seconds if you have a very long distance or slow connection. You can determine whether you are experiencing this more uncommon cause by using the following SQL statement:

SHOW STATUS like 'aborted_connections';

This statement usually will return an empty set. However, if you have been experiencing aborted connections, the value will increase by one for each initial connection attempt that the server aborts.

To change this value of connect_timeout, you can use the SET statement. You will need SUPER privileges.

 

SET GLOBAL connect_timeout = 20;

ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading authorization pa

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
执行SQL语句: update table_C, table_A set table_C.colC = table_A.colA where table_A.anotherId
刚把博客从百度云搬到腾讯云,发现文章少了几篇。当时在导入dump数据的时候,就曾经发现mysql提示:
原来一直是使用MySQL安装版没有出现过问题,今天在安装绿色版MySQL时出现了点问题 在安装成windows服
在使用mysqldump导出一份建库脚本是,发生了下面的错误: 当执行 desc table_name; 时也报错: tag
关于CentOS输入mysql提示: ERROR 2002 (HY000): Can't connect to local MySQL server through soc
关于CentOS输入mysql提示: ERROR 2002 (HY000): Can't connect to local MySQL server through soc
我的是CentOS6.3+MySQL5.1.57。 重启了一次服务器后,使用> mysql -u root -p登陆是出现下面的错
解决方法: 在web.config中连接字符串为: <appSettings> <add key="connectionStrings" v
这是开发安卓经常遇到的问题,一般adb kill-server 和adb start-server 就可以解决了,如果有问题,
相信不少同学和我一样遇到这个问题,有时候搞的还要重启电脑,那究竟是什么原因导致的呢,很明显,
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号