You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make up # build + run services
make down # stop services
make clean # remove containers and images
make fclean # wipe all data
5. Useful operational commands
# Enter the MariaDB container shell
docker exec -it srcs-mariadb-1 sh
# Connect to MariaDB using the application database user
mysql -u <db_user> -p
# List all databases on the server
SHOW DATABASES;# Switch to the WordPress database
USE wordpress_db;# List all tables inside the WordPress database
SHOW TABLES;# Show privileges assigned to the database user
SHOW GRANTS FOR '<db_user>'@'%';# Run a one-liner to list databases without entering the shell
docker exec mariadb mysql -u root -p -e "SHOW DATABASES;"# Check if MariaDB is listening on port 3306
ss -tulnp | grep 3306
# Inspect networks / volumes
docker network ls
docker volume ls
docker volume inspect <volume>