amoeba连接mysql--ERROR 2006 (HY000): MySQL server has gone away
amoeba下载地址:http://sourceforge.net/projects/amoeba/files
amoeba version:amoeba-mysql-binary-2.1.0-RC5.tar.gz
mysql version:5.5.20
OS:Oracle Linux Server release 5.7
java version: "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Server VM (build 14.0-b16, mixed mode)
amoeba 的安装和配置参考http://docs.hexnova.com/amoeba/index.html
安装和配置的过程比较简单,在此记录一个使用过程中遇到的问题:
[mysql@db01 ]$ mysql -uroot -pmysql -h192.168.0.18 -P8066
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11416420
Server version: 5.1.45-mysql-amoeba-proxy-2.1.0-RC5
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use test;
No connection. Trying to reconnect...
Connection id: 11416420
Current database: *** NONE ***
mysql> select * from t1;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 11416420
Current database: test
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 11416420
Current database: test
ERROR 2006 (HY000): MySQL server has gone away
amoeba日志中的错误:
2012-03-05 15:10:21,028 INFO net.ServerableConnectionManager - Amoeba Monitor Server listening on /192.168.0.18:8634.
java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1191)
at com.meidusa.amoeba.net.poolable.GenericObjectPool.borrowObject(GenericObjectPool.java:381)
at com.meidusa.amoeba.mysql.handler.CommandMessageHandler.startSession(CommandMessageHandler.java:629)
at com.meidusa.amoeba.mysql.handler.MySqlCommandDispatcher.handleMessage(MySqlCommandDispatcher.java:123)
at com.meidusa.amoeba.mysql.net.MysqlClientConnection$2.run(MysqlClientConnection.java:291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
查了一些资料,修改了以下三个参数,重启后依然没起作用。
http://dev.mysql.com/doc/refman/5.5/en/error-lost-connection.html
mysql>show variables like 'connect_timeout';
mysql>show variables like 'net_read_timeout';
mysql>show variables like 'max_allowed_packet';
仔细检查dbServers.xml配置后发现factoryConfig中
<property name="password">password</property>
默认是被注释掉的,注释取消后正常。
<factoryConfig class="com.meidusa.amoeba.mysql.net.MysqlServerConnectionFactory">
<property name="manager">${defaultManager}</property>
<property name="sendBufferSize">64</property>
<property name="receiveBufferSize">128</property>
<!-- mysql port -->
<property name="port">3306</property>
<!-- mysql schema -->
<property name="schema">test</property>
<!-- mysql user -->
<property name="user">root</property>
<!-- mysql password
<property name="password">password</property>
-->
</factoryConfig>
http://blog.csdn.net/lwei_998/article/details/7321880
amoeba连接mysql--ERROR 2006 (HY000): MySQL server has gone away的更多相关文章
- Python pandas ERROR 2006 (HY000): MySQL server has gone away
之前在做python pandas大数据分析的时候,在将分析后的数据存入mysql的时候报ERROR 2006 (HY000): MySQL server has gone away 原因分析:在对百 ...
- 解决ERROR 2006 (HY000): MySQL server has gone away
刚把博客从百度云搬到腾讯云,发现文章少了几篇.当时在导入dump数据的时候,就曾经发现mysql提示: ERROR 2006 (HY000): MySQL server has gone away N ...
- MaxScale ERROR 2006 (HY000): MySQL server has gone away
Error: MaxScale cannot be run as root.Failed to write child process message!解决办法:# maxscale -f /etc/ ...
- mysql 使用shell时出现 ERROR 2006 (HY000): MySQL server has gone away 解决方法
ERROR (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection Current d ...
- MySQL_解决ERROR 2006 (HY000) at line XX MySQL server has gone away问题
参考:http://www.111cn.net/database/mysql/106911.htm 1.修改mysqld的配置文件my.cnf 调整max_allowed_packet的值,修改为5M ...
- mysql恢复和数据导入的问题(ERROR 2006 (HY000) at line 1016: MySQL server has gone away)
今天在上班过程中需要将一个1.3G的数据库sql文件导入到mysql数据库中去,在执行过程遇到了一些问题,执行到一半时报错,错误如下 ERROR 2006 (HY000) at line 1016: ...
- Linux MySQl 5.7.17 MySQL ERROR 1366(HY000):Incorrect string value 解决方法
MySQL ERROR 1366(HY000):Incorrect string value,在往数据库中插入中文的时候会出现. 这也就是编码问题,网上大部分都是说设置下配置文件中的设置,而可悲的是在 ...
- MySQL:ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
解决方法: 修改密码:alter user 'root'@'localhost' identified by '123456'; mysql> use mysql; ERROR 1820 (HY ...
- mysql - ERROR 1114 (HY000): The table is full
mysql - ERROR 1114 (HY000): The table is full - Stack Overflowhttps://stackoverflow.com/questions/73 ...
随机推荐
- Errors running builder 'JavaScript Validator'错误处理
MyEclipse2014编辑代码时,只要保存就会报出如下错误信息: Errors occurred during the build. Errors running builder 'JavaScr ...
- 利用autotools工具制作从源代码安装的软件 分类: linux 2014-06-02 23:27 340人阅读 评论(0) 收藏
编写程序(helloworld.c)并将其放到一个单独目录. helloworld.c: #include<stdio.h> int main() { printf("hello ...
- selenium 延迟等待的三种方式
1.最直接普通的方式:这个是设置固定的等待时间 Thread.sleep(1000); 2.显示等待方式(Explicit Wait):就是明确的要等待的元素在规定的时间之内都没找到,那么就 ...
- 树莓派 VNC 远程桌面 同一个桌面
如何在ssh登录的情况下配置好vino 1.传输文件 2.ssh sudo dpkg -i ~/swap/deb/tight* sudo cp ~/swap/vino.desktop /etc/xdg ...
- Struts2------拦截器和标签库和注解开发
一.解析Struts2源码中拦截器的执行 客户端请求Action,执行前端控制器,在前端控制器内部创建了Action的代理类,调用代理类的execute方法,在execute方法内部执行ActionI ...
- 13 Red-black Trees
13 Red-black Trees Red-black trees are one of many search-tree schemes that are "balanced" ...
- 无聊的我写了一个代码 。。。P1605 迷宫
搜索水题 哎 直接不行了 . #include <ctype.h> #include <cstdio> void read(int &x) { x=;char ch=g ...
- K近邻法(K-Nearest Neighbor,KNN)
KNN是一种基本分类与回归方法,本篇只总结分类问题中的KNN. 输入:样本的特征向量,对应于特征空间中的点 输出:样本的类别,可取多类 算法思想:给定一个样本类别已知的训练数据集,对于新样本,根据其K ...
- spring mvc 配置运行报错误
四月 06, 2015 10:51:18 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server version: Ap ...
- velocity(vm)模板引擎基本语法
for循环 #foreach($acc in $!{param.tools}) #set($count = $count + 1) <li custom-data="$!{acc.or ...