This module provides high-level tools for installing a MySQL server and creating MySQL users and databases.
See also
Require a MySQL server to be installed and running.
Example:
from fabtools import require
require.mysql.server(password='s3cr3t')
Require a MySQL user.
Extra arguments will be passed to fabtools.mysql.create_user().
Example:
from fabric.api import settings
from fabtools import require
with settings(mysql_user='root', mysql_password='s3cr3t'):
require.mysql.user('dbuser', 'somerandomstring')
Require a MySQL database.
Extra arguments will be passed to fabtools.mysql.create_database().
Example:
from fabric.api import settings
from fabtools import require
with settings(mysql_user='root', mysql_password='s3cr3t'):
require.mysql.database('myapp', owner='dbuser')