1. Mikhail Korobov
  2. django-fab-deploy

Commits

Michael Brown  committed b629eb7

added root_password kwarg

  • Participants
  • Parent commits 10c041b
  • Branches default

Comments (0)

Files changed (1)

File fab_deploy/mysql.py

View file
  • Ignore whitespace
     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)