The previous tweak has an undesired side-effect. This correction might fix it:
Create and edit a drop-in systemd conf for sogo service:
mkdir -p /etc/systemd/system/sogod.service.d/
vi /etc/systemd/system/sogod.service.d/mariadb.conf
with the following content:
[Unit]
# Wait for mariadb/mysqld service
# see http://community.nethserver.org/t/sogo-sql-error-after-install/6407
After=mariadb.service mysqld.service
Apply the changes:
systemctl daemon-reload
Reboot the server to evaluate the whole starting process.