Phenomenon:
The program will be irregular connection errors, the problem is the exception of the bug information as follows:
The last packet successfully received by the server was milliseconds ago. The last packet sent successfully to the server was on the milliseconds ago.
Java.sql.SQLException:No Database selected
however , the connection through the client sqlyog/navicat is normal.
----------------------------------------------------------------------
Another: maxscale1.4.3 sometimes hangs, Port 4006 is closed directly. After we used the watch command backstage run monitoring .
Watch-d/bin/bash/root/sh/restart_maxsacle.sh
#!/bin/bashnetstat-ntlp | grep Maxscale | grep 4006 >/dev/null 2>&1if [$?-eq 1];then/etc/init.d/maxscale Startfi
Workaround:5.6 The following can be configured directly on the URL :autoreconnect=true
for 5.6 above, only the jdbc link pool is set:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/89/C7/wKiom1gcJ8eRZd5cAABCHLTCyQg422.png "title=" Picture 1.png "alt=" Wkiom1gcj8erzd5caabchltcyqg422.png "/>
The first one is set to Ture, time-out automatic link, for MySQL to set the second to false, do not enable caching.
These are some basic configurations that need to be noted for development.
The purpose is: each time When the connection is returned, select ' x ' is executed to detect if the connection is valid.
This article is from the "Spring Yang Technical column" blog, please be sure to keep this source http://hcymysql.blog.51cto.com/5223301/1869414
MaxScale2.0.1 with Java Druid Connection pooling considerations for read-write separation