cypht icon indicating copy to clipboard operation
cypht copied to clipboard

fix(other): resolve MySQL access denied in container networking with init script

Open IrAlfred opened this issue 4 months ago • 1 comments

🍰 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

IrAlfred avatar Dec 03 '25 07:12 IrAlfred

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.

kroky avatar Dec 04 '25 09:12 kroky