mickelsonmichael / dev

0 stars 0 forks source link

MariaDB `Host '172.0.0.3' is not allowed to connect` issue #7

Closed mickelsonmichael closed 1 year ago

mickelsonmichael commented 1 year ago

While creating a MediaWiki instance on my Synology NAS, I ran into an issue where the mediawiki service could not connect to the MariaDb database with an exception similar to

Host '172.0.0.3' is not allowed to connect

This was true for the MediaWiki UI and for a second msql instance running in the same network.

mickelsonmichael commented 1 year ago

Issue was due to the fact that MariaDb requires the connecting server to be in the same timezone as the MariaDb instance, which is apparently not inherited from the docker host.

The solution was to add

environment:
  TZ: Somewhere/Region

To the compose file, with America/Denver as the replacement for Somewhere/Region. Replace with your server's proper location.