Skip to content

Cannot access MySQL using default docker run command #943

@arencambre

Description

@arencambre

Per https://hub.docker.com/_/mysql, I can use docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag to start a MySQL instance. In my case, I used latest where tag was.

Adding a -p 3306:3306 switch has no effect, even thought that should work.

This does not work:
image

Per my Docker Desktop client, it is started:
image

It appears that it is not binding to its own port:
image

Here's a copy of the logs from Docker Desktop when I don't use the -p switch: mysql.log

Same log but when I do use the -p switch, which causes it to exit with an error code of 1: mysql_3306.log

The essentials of my network are running correctly and as expected, so I am at a loss to explain this. I am able to browse to the Drupal instance in the container that you can see is running above:
image

It is binding correctly:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions