I am having trouble connecting to the memSQL db locally. I followed flask doc’s and I keep getting an error “Cannot connect to MySql Server”. Everything runs well except that. Yes Docker is running. Any help is much appreciated.
1 Like
Are you connecting default socket? Docker can be problematic, try connecting with giving tcp-ip parameters.
Like 127.0.0.1 instead of localhost.
Can you share the dockerfile for the flask app and the docker-compose.yaml you’re using? Are you running both the flask app and MemSQL in the same Docker cluster?
We tried both localhost and 127.0.0.1. None of them works
- by locally do you mean the docker host or the docker image itself?
- in the docker image check if you are actually listening on the port? lsof -i
- check host settings in
settings.conf
- what is the detailed error msg for “Cannot connect to MySql Server” - especially the error code, this is usually either 2002 or 2003 - but they mean a very different thing
- could you try explicitly e.g. mysql --protocol=TCP --host=127.0.0.1 ?
- are you trying to connect with e.g. mysql client or memsql studio?