一.具体报错信息
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect…
Connection id: 2023202663
Current database: *** NONE ***
ERROR 2013 (HY000): Lost connection to MySQL server during quer
[root@client ~]# mysql -uamoeba -p123123 -h 192.168.206.99 -P80
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 2023202663
Server version: 5.1.45-mysql-amoeba-proxy-2.2.0
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and ot
Type 'help;' or '\h' for help. Type '\c' to clear the current i
MySQL [(none)]> show databases;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 2023202663
Current database: *** NONE ***
ERROR 2013 (HY000): Lost connection to MySQL server during quer
MySQL [(none)]> create database xx;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 2023202663
Current database: *** NONE ***
ERROR 2013 (HY000): Lost connection to MySQL server during quer
二.背景介绍
读写分离,客户端client远程登录amoeba后登录数据库后执行sql语句报错。
三.问题解决
排查
启动amoeba服务
查看amoeba端口时感觉有异常
根据报错看应该是服务有问题,检查amoeba数据库配置文件发现错误
mysql拼错
[root@ameoba conf]# vim dbServers.xml
修改重新启动amoeba查看端口
重新远程登入数据库测试正常