1) How can I run several different branches on the staging server?
2) How would I set up the DB evolution system to make sure it always has appropriate DB for each branch?
This depends on how much you expect your DB to scale. You can get pretty crazy with methods to clone database data but typically you will want a master copy that you do not ...
I'd argue that this isn't actually about staging servers. A staging server closely mimics the production environment, and is where a release goes immediately prior to going to production. A feature branch that hasn't been merged into master is not going to be released directly to production, so it should not go on a staging server.
If we reframe the ...
Since the response is Access denied for user so the port and the ip address is correct.
I guess the only issue as @James said will be in the permission, you have to allow root access to mysql from elk and php containers, you can do it in easy way but it's not secure:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
%: mean match all
That's a known issue .. since image layers are built using containers, data saved to folders does not make it to the next layer or your final container
Removing intermediate container b3ff83bbf273
If you want data to persist between updated containers you have to manually map data to the host outside the container-specific mount points.
For example, when ...
I think you could achieve something similar by first running Terraform against your RDS resources, and then running Terraform again on all resources.
On your first pass, you can use -target option to target only a subset of the resources. (ie. RDS resources).
Be aware that using this option is not recommended in Terraform docs. If I were you, I would use ...
First, confirm that the container is actually listening for connections and has properly bound to the interface. If not, you probably need to fix the bind-address= and/or port= directives in your my.cnf.
Otherwise, you probably have an issue with your GRANTs. Check that the IP/subnet is correctly authorized in the mysql.user table with the command