Commits

Michael Brown committed b629eb7

added root_password kwarg

Comments (0)

Files changed (1)

fab_deploy/mysql.py

     sql = MYSQL_CREATE_USER % dict(db_user=db_user, db_password=db_password)
     mysql_execute(sql, 'root')
 
-def mysql_create_db(db_name=None, db_user=None):
+def mysql_create_db(db_name=None, db_user=None, root_password=None):
     """ Creates an empty mysql database. """
     db_name, db_user, _ = _credentials(db_name, db_user, None)
 
     sql = MYSQL_CREATE_DB % dict(db_name=db_name, db_user=db_user)
-    mysql_execute(sql, 'root')
+    mysql_execute(sql, 'root',root_password)
 
     if db_user != 'root':
         mysql_create_user(db_user=db_user)