krang_createdb
Build databases which do not exist:
krang_createdb --all
Build the database for the instance 'test1':
krang_createdb test1
Destroy and recreate the 'test1' instance database:
krang_createdb --destroy test1
Destroy and recreate all databases:
krang_createdb --destroy --all
Provide the MySQL root password, required if MySQL is configured to need one:
krang_createdb --password foobar
Creates databases using information in krang.conf.
The script takes the following options:
By default the script only creates databases if they do not already exist. This option tells krang_createdb to destroy the database first. You will be prompted to confirm your dangerous request.
Operate on all databases. If this option is used then no instance name should be specified.
Do not create new databases. Can be useful if used in conjunction with --destroy.
Do not prompt user for confirmation on any events
If you configured MySQL to require a root password then you'll need to provide it here.
If you are running MySQL on another host then you'll need to provide it here.
Once gives you a play-by-play. Twice gets you full SQL.
The character set for the database. If this is unspecified it will be
taken from krang.conf if one exists.
If you use this option together with --all, the given charset will
be used to create all databases for all instances in krang.conf,
overriding instance-specific Charset directives therein.