Connect to MySQL in Docker container from host


Connect to MySQL in Docker container from host (without password):

mysql -h 127.0.0.1 -P 3306 -u root

Connect to MySQL in Docker container from host (with password):

mysql -h 127.0.0.1 -P 3306 -u root -p


If you enjoyed this post, please consider supporting this site!