ERROR 2006 (HY000): MySQL server has gone away
2015-10-15 18:07
696 查看
通过amoeba连接mysql时报错(端口3306改为8066即可)
去掉amoeba-mysql/conf/dbServers.xml中password的注释即可
mysql -uroot -h127.0.0.1 -P8066 -p123456 mysql> show databases; ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 381312122 Current database: test同时amoeba报错
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:633) 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:662)解决:
去掉amoeba-mysql/conf/dbServers.xml中password的注释即可
<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> <span style="color:#ff0000;"><!-- mysql password <property name="password">password</property> --></span> </factoryConfig>红色部分改为
<span style="white-space:pre"> </span><span style="color:#ff0000;"><!-- mysql password --> <property name="password">password</property></span>
相关文章推荐
- shell脚本:监控MySQL服务是否正常
- shell脚本:监控MySQL服务是否正常
- MySql常用维护命令7
- django postgresql中随机取出一条记录的实现
- MySQL数据定义语句:CREATE(创建)命令、ALTER(修改)命令、DROP(删除)
- PostgreSQL数据库 OLTP高并发请求性能优化
- Oracle FORALL & PostgreSQL ? op any|all (ARRAY)
- PL/SQL Developer 连接Oracle数据库详细配置方法
- PostgreSQL (User defined Operator) UDO & Operator Optimization Information
- londiste3 copy table' snapshot & PostgreSQL logical replication's snapshot 不同之处
- PostgreSQL & Oracle - 2 OLTP "update/select based primary key" & insert
- PostgreSQL & Oracle -1 OLTP "update/select based primary key" & insert
- population & sample covariance, standard deviation Aggregate in PostgreSQL
- PostgreSQL数据库监控中的统计学 - 对象空间的数据分布图
- MySQL主从架构之Master-Master互为主备
- Django如何连接mysql数据库
- SQL 中GO的作用
- MySQL架构体系
- Oracle学习(五)之 解决pl/sql developer中文乱码
- PostgreSQL实用日常维护SQL