Я пытаюсь использовать docker для моего проекта, в данный момент я пытаюсь настроить Mysql и Phpmyadmin.Я использовал следующий конфиг, но когда я пытаюсь войти в php myadmin, это выдает мне ошибки: пожалуйста, посмотрите это изображение:
Я прочитал много похожих темно все же я не мог это исправить .. как я могу решить эту проблему?
это мой файл docker-compose:
version: "3"
services:
db:
image: mariadb
container_name: mariadb
environment:
- MYSQL_DATABASE=academy
- MYSQL_USER=root
- MYSQL_PASSWORD=root
- MYSQL_ROOT_PASSWORD=root
volumes:
- ./db:/var/lib/mysql
ports:
- "3306:3306"
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpMyAdmin
restart: always
environment:
- "PMA_HOST=mariadb"
- "PMA_PORT=3306"
- "PMA_ABSOLUTE_URI=http://phpmyadmin.your.domain"
ports:
- 8181:80
links:
# for mysql container
- "db:db"
volumes:
- "./phpmyadmin/sessions:/sessions"
web:
build: ./DDGN
container_name: gunicorn
command: gunicorn -c gunicorn.conf DDGN.wsgi
volumes:
- ./DDGN:/DDGN
ports:
- "8000:8000"
nginx:
build: "./nginx"
container_name: nginx
depends_on:
- web
command: nginx -g 'daemon off;'
ports:
- "80:80"
volumes:
- ./DDGN/static:/var/www/static/
- ./DDGN/media:/var/www/media
external_links:
- mariadb:mariadb
- phpmyadmin:phpmyadmin
это мой файл ngnix.conf:
user nginx;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
client_max_body_size 1024M;
server {
listen 80;
charset utf-8;
server_name django.com;
access_log /dev/stdout;
error_log /dev/stdout info;
location /media/ {
alias /var/www/media/;
}
location /static/ {
alias /var/www/static/;
}
location /pma {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://phpmyadmin/; #! phpmyadmin is the docker host !
proxy_read_timeout 90;
}
location / {
proxy_pass http://web:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
}
update * дополнительная информация:
У меня есть эти журналы:
mariadb | 2019-01-27 19:10:58 0 [Note] InnoDB: Using Linux native AIO
mariadb | 2019-01-27 19:10:58 0 [Note] InnoDB: Mutexesand rw_locks use GCC atomic builtins
mariadb | 2019-01-27 19:10:58 0 [Note] InnoDB: Uses event mutexes
mariadb | 2019-01-27 19:10:58 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb | 2019-01-27 19:10:58 0 [Note] InnoDB: Number of pools: 1
mariadb | 2019-01-27 19:10:58 0 [Note] InnoDB: Using SSE2 crc32 instructions
mariadb | 2019-01-27 19:10:58 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
mariadb | 2019-01-27 19:10:58 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb | 2019-01-27 19:10:58 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mariadb | 2019-01-27 19:10:58 0 [ERROR] InnoDB: Invalid flags 0x4800 in ./ibdata1
mariadb | 2019-01-27 19:10:58 0 [ERROR] InnoDB: Plugininitialization aborted with error Data structure corruption
mariadb | 2019-01-27 19:10:59 0 [Note] InnoDB: Starting shutdown...
mariadb | 2019-01-27 19:10:59 0 [ERROR] Plugin 'InnoDB' init function returned error.
mariadb | 2019-01-27 19:10:59 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
mariadb | 2019-01-27 19:10:59 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb | 2019-01-27 19:10:59 0 [ERROR] Could not openmysql.plugin table. Some plugins may be not loaded
mariadb | 2019-01-27 19:10:59 0 [ERROR] Unknown/unsupported storage engine: InnoDB
mariadb | 2019-01-27 19:10:59 0 [ERROR] Aborting
mariadb |
mariadb exited with code 1