Andrew Fletcher published: 15 February 2022 1 minute read
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 Fletcher
•
07 Jan 2025
Managing DDEV environment troubleshooting and setting up multiple Drupal projects
DDEV has become a popular tool for local web development, offering a streamlined approach to managing Docker-based environments. However, setting up and managing DDEV projects, particularly with the latest versions of Docker Desktop, can present challenges. This article guides you through resolving...
Andrew Fletcher
•
21 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,...
Andrew Fletcher
•
13 Oct 2024
How to set up a CKAN environment using Docker with Solr schema configuration
Setting up CKAN in a Docker environment can sometimes require some additional troubleshooting, particularly when working with Solr for search functionality. In this article, we’ll walk through how to set up CKAN 2.11 in a Docker environment with a specific focus on resolving issues related to Solr...