Skip to content

Instantly share code, notes, and snippets.

@subhajeet2107
Created April 7, 2019 07:53
Show Gist options
  • Save subhajeet2107/a5df8e7e97326bada114539c498efd56 to your computer and use it in GitHub Desktop.
Save subhajeet2107/a5df8e7e97326bada114539c498efd56 to your computer and use it in GitHub Desktop.
How to connect docker mysql with docker sqlpad or phpmyadmin
mysql -u root -p --protocol=tcp -P 3309 #from this you can connect to docker container from host
docker run --name=testsql -p 3309:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7
docker run --name myadmin -d --link testsql:db -p 8080:80 phpmyadmin/phpmyadmin
docker run --name sqlpadman -d --link testsql:db -p 3000:3000 sqlpad/sqlpad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment