SQL Server Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • itlogix2012
    Junior Member
    • Feb 2025
    • 1

    #1

    SQL Server Access

    Hello, we are using a self-hosted system and need a way to query the database directly. Has anyone managed to install PHPAdmin or expose the Docker container so that we can make this happen?

  • lazovic
    Super Moderator
    • Jan 2022
    • 1181

    #2
    Hi itlogix2012,

    These articles may be helpful for you:

    Learn how to install phpMyAdmin on Ubuntu 20.04 and configure HTTPS/SSL with Let’s Encrypt for enhanced security and performance on your web server.


    Comment

    • jamie
      Senior Member
      • Aug 2025
      • 119

      #3
      super easy you just have to list the port and/or expose it. Here is my compose file to help you out. only thing that was a little tircky was what host to use though if your connecting externally, just use the ip of the host computer and whatever port you use, in my case 3307.

      You probably see the ${MYSQL_ROOT_PASSWORD} and might wonder what it is, that's stuff from the .env file

      Code:
      db:
      image: mariadb:latest
      container_name: ${CONTAINER_NAME}-db
      environment:
      TZ: Europe/London
      MARIADB_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
      MARIADB_USER: ${DB_USER}
      MARIADB_PASSWORD: ${DB_PASSWORD}
      MARIADB_DATABASE: ${DB_DATABASE}
      volumes:
      - db-data:/var/lib/mysql
      restart: unless-stopped
      healthcheck:
      test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
      interval: 20s
      start_period: 10s
      timeout: 10s
      retries: 3
      ports:
      - "${DB_PORT:-3307}:3306"
      expose:
      - "${DB_PORT:-3307}"
      # command:
      # --slow-query-log=1
      # --long-query-time=0.5
      # --log-output=FILE
      logging:
      driver: json-file
      options:
      max-size: "10m"
      max-file: "3"
      networks:
      - espocrm-net
      
      volumes:
      db-data:
      
      networks:
      espocrm-net:
      driver: bridge​

      Comment

      Working...