MYSQL:Lost connection to MySQL server at reading initial communication packet

Error: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Errno.: 2013

如果是一直这样大家可尝试

在服务那里开启mysql的服务,我的电脑--右键管理--服务和应用程序--找mysql---右键属性--启动

你在命令行能不能进去?不能进去就是你密码错了

无论通过什么途径远程访问都出现错误可以认为是系统有防火墙之类的限制,解决方法是在 my.cnf 里面的 [mysqld] 段增加一个启动参数

skip-name-resolve

如果是像我一样有时会有这种问题可以能是你的mysql占用cpu太高而自动停止mysql服务了,这样大家可想其它办法解决。

其它的方法

建议在my.ini文件中修改最大连接数,
把 mysql_connect() 方法都改成了 mysql_pconnect() 方法.
要修改mysql_pconnect(),可以在论坛的data目录的sql_config.php中
$pconnect = 0; //是否持久连接
修改成$pconnect = 1;
开启防刷新,严禁刷新太快.

时间: 2024-09-19 23:54:25

MYSQL:Lost connection to MySQL server at reading initial communication packet的相关文章

mysql报错:Lost connection to MySQL server at 'reading initial communication packet'问题

问题分析 innodb_buffer_pool_size = 2048M 设置过大,调整为innodb_buffer_pool_size = 1024M即可 解决办法 找到my.cnf 然后把innodb_buffer_pool_size 设置合合适的 # might be limited to 2-3.5G of user level memory per process, so do not # set it too high. innodb_buffer_pool_size=187M 意思

MySQL:reading initial communication packet问题解决方法_Mysql

解决方法之一: 网站访问出现如题错误,经过检查my.cnf,发现innodb_buffer_pool_size = 2048M 设置过大,调整为innodb_buffer_pool_size = 1024M即可,网上也有该问题的其他解决方法,但都不能解决我的问题. Lost connection to MySQL server at 'reading initial communication packet' 错误解决 上次解决了这个问题,今天又碰到,突然失忆,又做了一番无用功后终于搞定,这次一

mysql reading initial communication packet 解决方法

mysql教程 'reading initial communication packet'错误解决方法 出现这种问题是服务器突然关掉出现的问题, 错误提示是: 无法链接数据库教程(mysql)服务器, 请检查服务器地址.用户名.密码. 代码: 2013 错误: lost connection to mysql server at 'reading initial communication packet', system error: 0 下面我们来看看具体解解决办法 方法一:解决方法是在 m

mysql错误MySQL:reading initial communication packet

解决方法之一: 站访问出现如题错误,经过检查my.cnf,发现innodb_buffer_pool_size = 2048M 设置过大,调整为innodb_buffer_pool_size = 1024M即可. 看这句我们可以想到是innodb引擎的数据库而不是myisam的引擎的数据库哦. 如果上面方法 能不行我们可以尝试下面方法 解决方法是在 my.cnf 里面的 [mysqld] 段增加一个启动参数 skip-name-resolve 重启mysql试一下, 注:大家可检查一下服务器的用户

ERROR 2013 (HY000): Lost connection to MySQL server at 'waiting for initial communication packet', system error: 2

ERROR 2013 (HY000): Lost connection to MySQL server at 'waiting for initial communication packet', system error: 2 在/etc/my.cnf[mysqld]中加skip-name-resolve  

MySQL远程连接丢失问题解决方法(Lost connection to MySQL server)_Mysql

最近服务器很不稳定,于是重装了mysql 和php 服务,但是接着却遇到了很头疼的麻烦. 远程连接mysql是总是提示: 复制代码 代码如下: Lost connection to MySQL server at 'reading initial communication packet', system error: 0 很明显这是连接初始化阶段就丢失了连接的错误. google半天大多是说的注释掉配置文件中 bind-address = 127.0.0.1 这一句. 但是我的配置文件并没有配

解决Lost connection to MySQL server during query错误方法

昨天使用Navicat for MySQL导入MySQL数据库的时候,出现了一个严重的错误,Lost connection to MySQL server during query,字面意思就是在查询过程中丢失连接到MySQL服务器. [Msg] Decompressing... [Msg] Table Created: wp_wiki_copy [Msg] Importing Data... [Msg] 2013 - Lost connection to MySQL server during

mysqldump 导出发生Lost connection to MySQL server during query

在mysqldump备份导出的时候类似用如下语句导出数据 mysqldump -uroot -p'passwd' –opt –default-character-set=utf8 –triggers -R –hex-blob –single-transaction –no-autocommit –master-data=2 test_game mail >mail.sql 出现类似如下报错: mysqldump: Error 2013: Lost connection to MySQL serv

Lost connection to MySQL server during query的解决_Mysql

Error: Lost connection to MySQL server during query  错误信息很明显了,在查询的时候丢失了和MYSQL数据库服务器的连接.  MYSQL不稳定.