Connecting local MySQL database inside a Docker container?
Here is how I am trying to connect. But it shows:
Host ‘host.docker.internal’ is not allowed to connect
environment: - MYSQL_DSN=mysql:host=192.168.0.1;port=3307;dbname=dbname
Your MySQL user does not allow external connections.
Update your user to allow external connections using "GRANT" or create a new user using "CREATE USER": https://linuxize.com/post/how-to-create-mysql-user-accounts-and-grant-privileges/
To accept all connections, use
% wildcard as a host part.
Answered By – Camille