Localhost not connecting to memSQL

Hi Team,

I used docker to setup MemSQL

docker run -i --init
    --name memsql-ciab
    -e LICENSE_KEY=$env:LICENSE_KEY
    -p 3306:3306 -p 8580:8580
    memsql/cluster-in-a-box

docker exec -it memsql-ciab memsql

When trying to connect through http://localhost:8580/

Its throwing “This page isn’t working”

but from CLI- docker exec -it memsql-ciab memsql

Its able to connect and i am able to create database.

Thanks
Shankargouda

Hello,

The -p flag on the docker run command is used to specify which ports from the Docker container should be exposed on which ports in the host machine.

Right now, you’re exposing port 8580 from the Docker container into the porto 8580 of your computer (the host machine). What you want to do instead is expose the port 8080 from the Docker container to the port 8580 of the host machine.

To do that, simply run:

docker run -i --init --name memsql-ciab
-e LICENSE_KEY=$env:LICENSE_KEY -p 3306:3306 -p 8580:8080
memsql/cluster-in-a-box
1 Like