Code Monkey home page Code Monkey logo

Comments (6)

zxnhl702 avatar zxnhl702 commented on May 25, 2024 2

Hi there
I have the same issue too.
I tried mysql:5.7 instead of mysql:latest, and it just worked fine.No more errors.LOL

from dockerfiles.

alexeyOnGitHub avatar alexeyOnGitHub commented on May 25, 2024

+1. I have the same issue with the current module. tried various passwords.
UPDATE: apparently, this MantisBT image does not include MySQL, so you have to configure your owl MySQL and make sure that the image can access it.

from dockerfiles.

Penchung avatar Penchung commented on May 25, 2024

Thanks to @zxnhl702.
It works with me too. (docker-compose.yml is below)

mantisbt:
image: vimagick/mantisbt:latest
ports:
- "8989:80"
links:
- mysql
restart: always

mysql:
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=bugtracker
- MYSQL_USER=mantisbt
- MYSQL_PASSWORD=mantisbt
restart: always

from dockerfiles.

GhoctM avatar GhoctM commented on May 25, 2024

use 2.16.1
I encountered the same error with this version

from dockerfiles.

tsikerdekis avatar tsikerdekis commented on May 25, 2024

An updated version with some additions. The 2.18 version still requires 5.7 db for this docker to work.

version: '3'
services:
  mantisbt:
    image: vimagick/mantisbt:latest
    volumes:
        - ./config:/var/www/html/config
    ports:
      - "80:80"
    links:
      - mysql
    restart: always
  mysql:
    image: mysql:5.7
    container_name: mysql
    ports:
      - "3306:3306"
    volumes:
        - ./mysql-data:/var/lib/mysql
        - ./dump.sql:/docker-entrypoint-initdb.d/dump.sql
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=bugtracker
      - MYSQL_USER=mantisbt
      - MYSQL_PASSWORD=mantisbt
    restart: always
  backup_mysql:
    image: jtilander/backup-db:latest
    environment:
      - DBTYPE=mysql
      - CONTAINER=mysql
      - USERNAME=root
      - PASSWORD=root
      - "CRONSCHEDULE=0 0 * * *"
      - DBNAME=bugtracker
      - DEBUG=0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./tmp/backup:/data
    command: cron

from dockerfiles.

konylee avatar konylee commented on May 25, 2024

出现BAD
Does administrative user have access to the database? ( Can't connect to MySQL server on 'xxx' (13) )的错误,结果是 SELinux 不让 httpd 访问外网,一开始还以为是iptables造成的,关闭之后发现还是不行。

原因:
#getsebool -a | grep httpd

[root@centos]#getsebool -a | grep httpd
allow_httpd_anon_write --> off
allow_httpd_mod_auth_ntlm_winbind --> off
allow_httpd_mod_auth_pam --> off
allow_httpd_sys_script_anon_write --> off
httpd_builtin_scripting --> on
httpd_can_check_spam --> off
httpd_can_network_connect --> off
httpd_can_network_connect_cobbler --> off
httpd_can_network_connect_db --> off
httpd_can_network_memcache --> off
httpd_can_network_relay --> off
httpd_can_sendmail --> off
httpd_dbus_avahi --> on
httpd_enable_cgi --> on
httpd_enable_ftp_server --> off
httpd_enable_homedirs --> off
httpd_execmem --> off
httpd_read_user_content --> off
httpd_setrlimit --> off
httpd_ssi_exec --> off
httpd_tmp_exec --> off
httpd_tty_comm --> on
httpd_unified --> off
httpd_use_cifs --> off
httpd_use_gpg --> off
httpd_use_nfs --> off

发现 httpd_can_network_connect_db --> off

解决方案:
#/usr/sbin/setsebool -P httpd_can_network_connect_db on

from dockerfiles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.