db

list

sw db list

List all databases in the system. This list excludes system databases like information_schema.

add

sw db add
sw db create
sw db add database_name
sw db add database_name database_user

Create a new MySQL database along with a new user. You will be prompted for the name of the database, the username, and the user’s password and if required, the root MySQL password. The user is only set up to allow local access.

listuser

sw db listuser
sw db listusers

List all database users.

listgrant

sw db listgrant
sw db listgrants

List database users and over which databases they have some rights granted.

remove

sw db remove
sw db remove database_name
sw db delete
sw db delete database_name

Delete a database and all of it’s data. You will be prompted to also remove all users that have grant rights over the database.

check

sw db check
sw db check database_name
sw db check +

Check a database to see if it is in need of repair. If “+” is given, all databases are checked.

repair

sw db repair
sw db repair database_name

Run a repair on an SQL database.