mirror of
https://github.com/uprightbass360/AzerothCore-RealmMaster.git
synced 2026-01-13 00:58:34 +00:00
Fix MySQL NFS permission issues
- Run MySQL container as root (user: 0:0) to handle NFS mount permissions - Add --user=mysql flag to MySQL command to switch to mysql user after initialization - This resolves 'Permission denied' errors when using NFS volumes for MySQL data
This commit is contained in:
@@ -9,6 +9,7 @@ services:
|
|||||||
ac-mysql:
|
ac-mysql:
|
||||||
image: mysql:8.0
|
image: mysql:8.0
|
||||||
container_name: ac-mysql
|
container_name: ac-mysql
|
||||||
|
user: "0:0" # Run as root to handle NFS permissions
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ${DOCKER_DB_ROOT_PASSWORD:-password}
|
MYSQL_ROOT_PASSWORD: ${DOCKER_DB_ROOT_PASSWORD:-password}
|
||||||
MYSQL_ROOT_HOST: '%'
|
MYSQL_ROOT_HOST: '%'
|
||||||
@@ -23,6 +24,7 @@ services:
|
|||||||
- --max_connections=1000
|
- --max_connections=1000
|
||||||
- --innodb-buffer-pool-size=256M
|
- --innodb-buffer-pool-size=256M
|
||||||
- --innodb-log-file-size=64M
|
- --innodb-log-file-size=64M
|
||||||
|
- --user=mysql
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p${DOCKER_DB_ROOT_PASSWORD:-password}"]
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p${DOCKER_DB_ROOT_PASSWORD:-password}"]
|
||||||
|
|||||||
Reference in New Issue
Block a user