Index: trunk/ippToPsps/jython/mysql.py
===================================================================
--- trunk/ippToPsps/jython/mysql.py	(revision 33780)
+++ trunk/ippToPsps/jython/mysql.py	(revision 33787)
@@ -34,4 +34,7 @@
         self.dbPass = config.getDbPassword(dbType)
 
+        # a user friendly connection sring
+        connectionStr = self.dbName + "@" + self.dbHost
+
         # set up JDBC connection
         self.url = "jdbc:mysql://"+self.dbHost+"/"+self.dbName+"?autoReconnect=true&user="+self.dbUser+"&password="+self.dbPass
@@ -39,12 +42,10 @@
             self.con = DriverManager.getConnection(self.url)
             self.connectionID = self.getLastConnectionID()
-            self.logger.debug("MySQL connection to %s with ID %d" % (dbType, self.connectionID))
+            self.logger.infoPair("Connected to MySQL Db", connectionStr)
         except:
-            self.logger.error("Unable to connect to " + self.url)
-            self.everythingOK = False # TODO need this?
+            self.logger.errorPair("Unable to connect to", connectionStr)
             self.connected = False
-            return
-
-        self.everythingOK = True
+            raise
+
         self.connected = True
 
@@ -251,8 +252,25 @@
         except: pass
             #self.logger.warn("Index already in place on '" + column + "' for table '" + table + "'")
+
+    '''
+    Checks that we have a connection
+    '''
+    def isConnected(self):
+
+        try: 
+            self.con
+            self.connected = True
+        except:
+            self.logger.errorPair("Not connected to", self.url)
+            self.connected = False
+
+        return self.connected
+
     '''
     TODO
     '''
     def execute(self, sql):
+
+        if not self.isConnected(): raise
 
         stmt = self.con.createStatement()
@@ -265,4 +283,6 @@
     def executeQuery(self, sql):
 
+        if not self.isConnected(): raise
+  
         stmt = self.con.createStatement()
         rs = stmt.executeQuery(sql)
