mirror of
https://github.com/hassio-addons/addon-traccar.git
synced 2025-05-04 19:11:31 +00:00
📚 Documents the use of MySQL/MariaDB with this add-on
This commit is contained in:
parent
249a98bf7e
commit
c6d4829bc6
2 changed files with 42 additions and 0 deletions
30
README.md
30
README.md
|
@ -51,6 +51,8 @@ comparison to installing any other Hass.io add-on.
|
|||
1. Check the logs of the "Traccar" add-on to see if everything went well.
|
||||
1. Click the "OPEN WEB UI" button and log in using `admin`/`admin`.
|
||||
1. Be sure to change the username and password!
|
||||
1. After testing, please consider using MariaDB, since it makes the add-on
|
||||
far more stable. Please, consult the add-on manual on how to configure this.
|
||||
|
||||
**NOTE**: Do not add this repository to Hass.io, please use:
|
||||
`https://github.com/hassio-addons/repository`.
|
||||
|
@ -113,6 +115,34 @@ The private key file to use for SSL.
|
|||
|
||||
**Note**: _The file MUST be stored in `/ssl/`, which is the default for Hass.io_
|
||||
|
||||
## Storing data in MySQL/MariaDB
|
||||
|
||||
By default, Traccar uses a database that is called H2. It is sweet, since it
|
||||
works out of the box. However, it is not considered stable for production use,
|
||||
so only use it for evaluation and testing purposes.
|
||||
|
||||
It is highly recommended to use a MySQL database with this add-on. For example
|
||||
you could install the MariaDB add-on that is in the add-on store.
|
||||
|
||||
Add the following configuration to your `traccar.xml` that is stored in your
|
||||
Home Assistant configuration directory (`/config/traccar.xml`):
|
||||
|
||||
```xml
|
||||
<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
|
||||
<entry key='database.url'>jdbc:mysql://core-mariadb:3306/traccar?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
|
||||
<entry key='database.user'>USERNAME</entry>
|
||||
<entry key='database.password'>PASSWORD</entry>
|
||||
```
|
||||
|
||||
The above template is already in the config file on newer installations and
|
||||
can be simply commented out to be activated.
|
||||
|
||||
Don't forget to add the database `traccar` to the MariaDB add-on configuration
|
||||
and add the username (with its password) to have access to that database as
|
||||
well.
|
||||
|
||||
Don't forget to restart the add-on after making changes.
|
||||
|
||||
## Integrating into Home Assistant
|
||||
|
||||
The `traccar` component of Home Assistant makes it possible to transfer all
|
||||
|
|
|
@ -17,6 +17,18 @@
|
|||
https://www.traccar.org/configuration-file/
|
||||
-->
|
||||
|
||||
<!--
|
||||
Remove the comment from the block below to enable MySQL/MariaDB
|
||||
for Traccar. Don't forget to adjust it to your setup.
|
||||
(Usually, just setting the correct USERNAME & PASSWORD).
|
||||
-->
|
||||
<!-- // Remove this line to activate MySQL
|
||||
<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
|
||||
<entry key='database.url'>jdbc:mysql://core-mariadb:3306/traccar?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
|
||||
<entry key='database.user'>USERNAME</entry>
|
||||
<entry key='database.password'>PASSWORD</entry>
|
||||
// Remove this line to activate MySQL -->
|
||||
|
||||
<!-- Enter you custom configuration below this line -->
|
||||
|
||||
</properties>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue