home-assistant.io/source/_addons/mariadb.markdown
Franck Nijhof 1833c32a2c Cleans up front matter (#9835)
* Sets front matter defaults

* Removes default front matter from section templates/pages

* Removes default front matter from addon pages

* Removes default front matter from integration pages

* Removes default front matter from posts

* Removes default front matter from docs pages

* Removes default front matter from other pages

* Fixes blog category pages
2019-07-11 14:35:08 -07:00

82 lines
1.9 KiB
Markdown

---
title: "MariaDB"
description: "MariaDB Server is one of the most popular database servers in the world."
---
Set up a [MariaDB](https://mariadb.org/) SQL server. It supports multiple databases, users and permission settings. If you want to only connect from inside Home Assistant use `core-mariadb` as the host address.
```json
{
"databases": ["homeassistant"],
"logins": [
{
"username": "hass",
"host": "homeassistant",
"password": "securePassword"
}
],
"rights": [
{
"username": "hass",
"host": "homeassistant",
"database": "homeassistant",
"grant": "ALL PRIVILEGES ON"
}
]
}
```
{% configuration %}
databases:
description: List of databases.
required: true
type: list
logins:
description: List of SQL accounts to create or update.
required: true
type: list
keys:
username:
description: Username for account.
required: true
type: string
host:
description: Host for account. If you need an account on multiple hosts, use '%'.
required: true
type: string
password:
description: Password for account.
required: true
type: string
rights:
description: List of rights to be granted.
required: true
type: list
keys:
username:
description: Username for granted rights.
required: true
type: string
host:
description: Host is a part of username like above.
required: true
type: string
database:
description: Database name on which to grant user rights.
required: true
type: string
grant:
description: SQL grant part for access too.
required: true
type: string
{% endconfiguration %}
## Home Assistant configuration
Use the following configuration in Home Assistant to use the database above:
```yaml
recorder:
db_url: mysql://hass:securePassword@core-mariadb/homeassistant?charset=utf8
```