---
name: "cdist-type__mysql_database"
section: "7"
platform: "linux"
package: "cdist"
version: "7.0.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cdist-type__mysql_database"
---

# cdist-type\_\_mysql\_database(7)

Manage a MySQL database

## NAME

cdist-type\_\_mysql\_database - Manage a MySQL database

## DESCRIPTION

Create MySQL database and optionally user with all privileges.

## OPTIONAL PARAMETERS

- **name**

  Name of database. Defaults to object id.

- **user**

  Create user and give all privileges to database.

- **password**

  Password for user.

- **state**

  Defaults to present. If absent and user is also set, both will be removed (with privileges).

## EXAMPLES

```
# just create database
__mysql_database foo
# create database with respective user with all privileges to database
__mysql_database bar \
    --user name \
    --password secret
```

## AUTHORS

Ander Punnar \<ander-at-kvlt-dot-ee\>

## COPYING

Copyright (C) 2020 Ander Punnar. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

## COPYRIGHT

ungleich GmbH 2021
