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:
- --destroy
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.
- --all
Operate on all databases. If this option is used then no instance
name should be specified.
- --no_create
Do not create new databases. Can be useful if used in conjunction with
--destroy.
- --no_prompt
Do not prompt user for confirmation on any events
- --password [pass]
If you configured MySQL to require a root password then you'll need to
provide it here.
- --hostname [host]
If you are running MySQL on another host then you'll need to
provide it here.
- --verbose
Once gives you a play-by-play. Twice gets you full SQL.
- --charset
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.
- --help
- --man