Jump to content
Akinix
Sign in to follow this  
Perpetual Newbie

How to connect to MySQL running in docker container?

Recommended Posts

How to connect to MySQL running in docker container?

I'm used this commands to run MySQL in docker:

docker pull mysql
docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag

I need to connect with DBeaver.

Share this post


Link to post
Share on other sites

Use -p parameter to open 3306 port of container for external connections. For example:

docker run -p 3306:3306 --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag
  • Thanks 1

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...