public boolean isContainerReady(ProcessResults pr) {
        Pattern pat = Pattern.compile("mysqld.*ready for connections.*port.*3306");
        Matcher m = pat.matcher(pr.stderr);
        return m.find();
    }
Designed for MySQL external database connection
itests/util/src/main/java/org/apache/hadoop/hive/ql/externalDB/MySQLExternalDB.java