---
title: "解决MySQL错误reading initial communication packet"
author: "usenrong"
date: "2013-01-06T15:51:22Z"
tags: []
categories: ["开源软件"]
slug: "mysql-reading-initial-communication-packet"
draft: false
lastmod: "2013-01-06T15:51:22Z"
id: 1763787
url: "https://sunrysoft.iteye.com/blog/1763787"
---

使用navicat远程访问VPS云主机 出现如题reading initial communication packet错误，经过检查my.cnf，发现innodb\_buffer\_pool\_size = 2048M 设置过大，调整为innodb\_buffer\_pool\_size = 1024M即可，网上也有该问题的其他解决方法，但都不能解决我的问题。

Lost connection to MySQL server at 'reading initial communication packet' 错误解决   
   
上次解决了这个问题，今天又碰到  
   
1、修改mysql配置文件

vi /etc/my.cnf

\[mysqld]段加

skip-name-resolve

在这个之前要把mysql的远程访问权限打开，或者再加skip-grant-table（不推荐）

   
2、修改hosts.allow

vi /etc/hosts.allow

加

mysqld : ALL : ALLOW  
mysqld-max : ALL :ALLOW