环境:在VirtualBox中安装了Ubuntu虚拟机,网络使用了NAT模式,开启了端口转发。

局域网内其他计算机访问虚拟机中的MySQL Server出现两个问题:

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

以及

host is not allowed to connect mysql

1.解决Lost connection to MySQL server at 'reading initial communication packet, system error: 0

修改/etc/mysql/my.cnf

注释#bind-address = 127.0.0.1

在[mysqld]中加入skip-name-resolve

2.解决host is not allowed to connect mysql

进入mysql库:

grant all privileges on *.* to 'root'@'%' identified by 'YourPassword' with grant option;

虚拟机中MySQL连接问题:Lost connection to MySQL server at 'reading initial communication packet, system error: 0 以及 host is not allowed to connect mysql的更多相关文章

  1. mysql远程连接问题 Lost connection to MySQL server at ‘reading initial communication packet', system error: 0

    在用Navicat for MySQL远程连接mysql的时候,出现了 Lost connection to MySQL server at ‘reading initial communicatio ...

  2. MySQL远程连接丢失问题解决方法Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0

    最近远程连接mysql总是提示 Lost connection 很明显这是连接初始化阶段就丢失了连接的错误 其实问题很简单,都是MySQL的配置文件默认没有为远程连接配置好,只需要更改下MySQL的配 ...

  3. Lost connection to MySQL server at ‘reading initial communication packet', system error: 0 mysql远程连接问题

    在用Navicat for MySQL远程连接mysql的时候,出现了 Lost connection to MySQL server at ‘reading initial communicatio ...

  4. Mysql Lost connection to MySQL server at ‘reading initial communication packet', system error: 0

    在用Navicat for MySQL远程连接mysql的时候,出现了 Lost connection to MySQL server at ‘reading initial communicatio ...

  5. mysql登陆时出现ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

    有4到5天没开mysql,这天晚上打=打开phpstudy,想进去mysql练习练习,结果丢给我这个 ERROR 2013 (HY000): Lost connection to MySQL serv ...

  6. mysql远程连接错误提醒:2013-Lost connection to MySQL server at ‘reading initial communication packet', system error: 0

    因为没有匹配/etc/hosts.allow. 解决方法: 1.在hosts.allow 文件中添加 mysqld:ALL [root@ucDB204 ~]# cat /etc/hosts.allow ...

  7. navicat 出现 mysql远程连接问题 Lost connection to MySQL server at ‘reading initial communication packet', system error: 0

    今天做服务器上的东西需要看数据库时,突然发现有这个报错,然后自己也查了很多资料 我最后找到一个在my,cnf配置文件中mysqld下加入一条 max_allowed_packet = 500M 也就是 ...

  8. Lost connection to MySQL server at 'reading initial communication packet', system error: 0的一个解决方案

    -A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT在icmp之前/etc/init.d/iptables restar ...

  9. lost connection to mysql server at "reading initial communication packet",system error:2

随机推荐

  1. Bootstrap学习笔记系列2-------Bootstrap简单表格处理

    标签 <table> 为表格添加基础样式 <thead> 表格标题行的容器元素,用来识别列 <tbody> 表格主提中的表格行的容器元素 <tr> 单行 ...

  2. Asp.Net WebService 使用后来管理系统对接口方法进行公开控制

    思路: 1.需要找一个访问Webservice的统一入口,刚开始进入了一个误区,以为WebService是单独的运行程序,后来经朋友提醒,其实它也是通过http请求在asp.net framework ...

  3. 身份证验证合法性js--已验证

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  4. Android调用系统自带的设置界面

    Android有很多系统自带的设置界面,如设置声音,设置网络等. 在开发中可以调用这些系统自带的设置界面. 点击以下列表中的选项,就可以调出相应的系统自带的设置界面. 如点击“无线和网络设置”,可以调 ...

  5. 优化JavaScripe 提升首页加载速度的几种方案解析

    优化目的: 1. 减少load量. 2. 优化js,加快页面加载速度. 网站中最影响网站打开速度的是什么?我会告诉是网站中的javascript,简称JS.模板中引用的JS文件越多,打开速度越慢,细读 ...

  6. 项目总结笔记系列 Maven Session1

    主题:Maven 参考地址: 1.http://www.yiibai.com/maven/ 2.http://www.icoolxue.com/ 目录 1.环境搭建 2.pom.xml文件解析 3.m ...

  7. SQL vs NoSQL 没有硝烟的战争!

    声明:本文译自SQL vs NoSQL The Differences,如需转载请注明出处. SQL(结构化查询语言)数据库作为一个主要的数据存储机制已经超过40个年头了.随着web应用和像MySQL ...

  8. ahjesus Ubuntu配置svn服务器

    转载自http://www.cnblogs.com/ximu/articles/2119136.html 亲测可用 一.SVN安装1.安装包$ sudo apt-get install subvers ...

  9. texrecon进行纹理映射

    使用texrecon进行纹理映射: 1)       跳转到mesh所在目录 cd meshdir 2)       参数 a)         texrecon.exe b)         bun ...

  10. crystal

    1.在*{margin:0;padding:0;}下,标签自带样式会失去效果,如:blockquote.table下cellpadding,align等. 2.标签自带属性样式没有css高. 3.在c ...