Skip to main content

Running Docker and attempting to install a web proxy environment where I'm attempting to create local web set up the consist of Drupal 9 with Composer + Docker-compose + Nginx + MariaDB + PHP8.1

However, when I run the command

docker-compose up

The terminal hangs at

Version: '10.6.5-MariaDB-1:10.6.5+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

So my initial question is to check the port mariadb is running on?  Is the port already in use?  However, how can I check what port(s) are in use?

 

How to get MySQL's port on Mac through terminal?

Initially I tried 

ps aux | grep mysql

The output was 

{name}   23335   0.0  0.0  4277640    748 s000  S+   10:03am   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox mysql

Whereas, to listen in on ports in use with netstat

netstat -ap tcp | grep -i "listen"
tcp46      0      0  *.us-srv               *.*                    LISTEN
tcp46      0      0  *.cslistener           *.*                    LISTEN
tcp46      0      0  *.mysql                *.*                    LISTEN
tcp4       0      0  localhost.55181        *.*                    LISTEN
tcp6       0      0  *.55179                *.*                    LISTEN
tcp4       0      0  *.55179                *.*                    LISTEN
tcp46      0      0  *.http                 *.*                    LISTEN
tcp4       0      0  localhost.16494        *.*                    LISTEN
tcp4       0      0  localhost.15393        *.*                    LISTEN
tcp4       0      0  localhost.56952        *.*                    LISTEN
tcp4       0      0  localhost.45623        *.*                    LISTEN
tcp4       0      0  localhost.49544        *.*                    LISTEN
tcp4       0      0  localhost.49543        *.*                    LISTEN
tcp4       0      0  localhost.15292        *.*                    LISTEN
tcp4       0      0  localhost.cslistener   *.*                    LISTEN
tcp4       0      0  *.35729                *.*                    LISTEN

 

 

Related articles

Andrew Fletcher21 Nov 2024
Docker steps for rebuilding
Docker containers listTo view a list of Docker containers that are currently running, you can use the docker ps command. Open your terminal or command prompt and run the following command:docker psThis command will display a list of running containers, showing information like the container ID,...