def __init__(self, database_env='test', conf_creds=None):
        """
        Gets database information from mysql_conf.py and creates a connection.
        """
        import MySQLdb
        db_server, db_user, db_pass, db_schema = \
            conf.APP_CREDS[conf.Apps.TESTCASE_REPOSITORY][database_env]
        retry_count = 3
        backoff = 1.2  # Time to wait (in seconds) between retries
        count = 0
        while count < retry_count:
            try:
                self.conn = MySQLdb.connect(host=db_server,
                                            user=db_user,
                                            passwd=db_pass,
                                            db=db_schema)
                self.conn.autocommit(True)
                self.cursor = self.conn.cursor()
                return
            except Exception:
                time.sleep(backoff)
                count = count + 1
        if retry_count == 3:
            raise Exception("Unable to connect to Database after 3 retries.")
dataset/ETHPy150Open mdmintz/SeleniumBase/seleniumbase/core/mysql.py/DatabaseManager.__init__/original