If you are using MariaDB as container, following the tutorial as is should just work
If your DB is located in Syno’s MariaDB, run the above to enable access
and also check out this Error when setup database - #12 by fred
In your case it would be to allow all from 172.17.0.0/255.255.0.0
Syno’s firewall might be blocking access to Syno’s MariaDB