fix(other): resolve MySQL access denied in container networking with init script
🍰 Pullrequest
This PR fixes Access denied for user 'cypht'@'<ip>' errors when running Cypht with MySQL/MariaDB in Docker by ensuring the application DB user is created with the correct host permissions for container networking.
Issue
Related to https://github.com/cypht-org/cypht/issues/1020
see https://github.com/MariaDB/mariadb-docker/blob/5ad00a82b5bb2705825c7afb670f6547b1bed316/10.11/docker-entrypoint.sh#L442
Passing MARIADB_USER and MARIADB_PASSOWRD + MARIADB_DATABASE should give enough permissions for the user to access the database regardless of the docker container. @% host is usually enough. If we can use something from the official dockerfile or entrypoint, let's use it instead of creating our own.