Currently working with wordpress with mariadb in docker. I can connect the wordpress to the database but when I try to connect it using sequel ace, it returns an error saying that my credential is not correct.
Unable to connect to host maria, or the request timed out.
Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).
MySQL said: Unknown MySQL server host 'maria' (0)
@jonjiepb No. The name of the container is used inside of the containers, to allow the containers to communicate. Sequel ace is outside, and has no knowledge of the containers. Therefor you are connecting to your local machine. Docker has then exposed the port (3306:3306) on localhost to allow the connection. You can therefor also have several datbases in seperate projects which have different ports exposed (for instance 3307:3306). The second number is the port inside the container, and the first is what port you want to listen to on localhost
@Sinnbeck Okay I got it now. So basically, I can only use the container name inside my application (e.g. ENV file in laravel) and to be able to use it outside (e.g. sequel ace), I have to expose the port?