mirror of
https://github.com/weewx/weewx.git
synced 2026-04-18 00:26:57 -04:00
Include instructions on making sure MySQL/MariaDB starts before WeeWX
Alternative to PR #1030.
This commit is contained in:
@@ -91,3 +91,14 @@ again assuming user `weewx` with password `weewx`. Adjust as necessary.
|
||||
CREATE USER 'weewx'@'localhost' IDENTIFIED BY 'weewx';
|
||||
GRANT select, update, create, delete, insert, alter, drop ON weewx.* TO weewx@localhost;
|
||||
```
|
||||
|
||||
### 5. Make sure MySQL/MariaDB starts before WeeWX
|
||||
|
||||
You may want to add the following to your `weewx.service` file (generally
|
||||
located in `/etc/systemd/system/weewx.service`), under the `[Unit]` section:
|
||||
|
||||
```ini
|
||||
After=mariadb.service mysqld.service
|
||||
Wants=mariadb.service mysqld.service
|
||||
```
|
||||
This will ensure that MySQL/MariaDB starts before WeeWX.
|
||||
@@ -8,6 +8,14 @@ After=time-sync.target
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
# If you are using MySQL uncomment the following lines:
|
||||
# After=mysqld.service
|
||||
# Wants=mysqld.service
|
||||
|
||||
# If you are using MariaDB uncomment the following lines:
|
||||
# After=mariadb.service
|
||||
# Wants=mariadb.service
|
||||
|
||||
[Service]
|
||||
ExecStart=WEEWX_PYTHON WEEWXD WEEWX_CFGDIR/weewx.conf
|
||||
StandardOutput=null
|
||||
|
||||
Reference in New Issue
Block a user