mysql disconnection handling
change this to self