def undeploy_database(options):
    logger.warning("Undeploying database for VO %s. The database contents will be lost.", options.vo)
    if options.dbtype == MYSQL and options.dropdb:
        execute_cmd(mysql_util_cmd("drop_db", options), "Error dropping MySQL database for VO %s!" % options.vo)
    else:
        execute_cmd(voms_undeploy_database_cmd(options.vo), "Error undeploying VOMS database for VO %s!" % (options.vo))
def create_mysql_db(options):
    createdb_cmd = mysql_util_cmd("create_db", options)
    if not options.dbapwd or len(options.dbapwd) == 0:
        logger.warn("WARNING: No password has been specified for the mysql root account.")

    execute_cmd(createdb_cmd, "Error creating MySQL database schema.")