ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: Error on startup of the ragflow-mysql container

Open 123hzx opened this issue 10 months ago • 3 comments

Self Checks

  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (Language Policy).
  • [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • [x] Please do not modify this template :) and fill in all the required fields.

Describe your problem

When I did docker-compose --file docker-compose.yml up -d,container ragflow-mysql report an Error. I use docker logs -f ragflow-server to check the log, find the following error:

2025-06-18 15:46:52+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.39-1.el9 started. 2025-06-18 15:46:52+08:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2025-06-18 15:46:52+08:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.39-1.el9 started. 2025-06-18 15:46:52+08:00 [Warn] [Entrypoint]: MYSQL_PASSWORD specified, but missing MYSQL_USER; MYSQL_PASSWORD will be ignored ls: cannot access '/docker-entrypoint-initdb.d/': Operation not permitted

OS: NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

I pull images to docker,so I change something in docker-compose-base.yml and ./.env

docker-compose-base.yml 1、 image: elasticsearch:8.17.6 pull_policy: never 2、 image: mysql:8.0.39 3、image: quay.io/minio/minio:RELEASE.2025-04-08T15-41-24Z 4、image: valkey/valkey:8.0.3

./.env RAGFLOW_IMAGE=infiniflow/ragflow:v0.19.0

then

123hzx avatar Jun 18 '25 08:06 123hzx

Hi @123hzx! I'm Dosu and I’m helping the ragflow team.

Your error is caused by two main issues:

  1. The warning MYSQL_PASSWORD specified, but missing MYSQL_USER; MYSQL_PASSWORD will be ignored means you need to add MYSQL_USER=root to your .env file or to the environment section of your MySQL service in docker-compose-base.yml to ensure the password is used as intended (reference).

  2. The Operation not permitted error accessing /docker-entrypoint-initdb.d/ is likely due to SELinux restrictions on CentOS 7. To fix this, add :z to the end of your volume mount in the compose file, for example:
    - ./init.sql:/docker-entrypoint-initdb.d/10-init.sql:z
    Also, make sure your init.sql file is world-readable:
    chmod 644 ./init.sql
    (reference)

If the container still fails to start, try deleting the ./volumes/mysql_data directory and restarting the service to let MySQL reinitialize the data directory (reference).

Let me know if you need more details on any of these steps.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

dosubot[bot] avatar Jun 18 '25 08:06 dosubot[bot]

I try to use your way, it still has same error

I download new file from the web on this morning, so I don't change the password.

123hzx avatar Jun 18 '25 08:06 123hzx

I reboot the OS and restart docker, this error still has

123hzx avatar Jun 18 '25 08:06 123hzx

Try mariaDB.

KevinHuSh avatar Jun 20 '25 03:06 KevinHuSh

OK,now I try to change MYSQL_PASSWORD in ./.env to MYSQL_ROOT_PASSWORD,this error doen't have 2025-06-18 15:46:52+08:00 [Warn] [Entrypoint]: MYSQL_PASSWORD specified, but missing MYSQL_USER; MYSQL_PASSWORD will be ignored

123hzx avatar Jun 20 '25 09:06 123hzx

I try to change this configuration from mysql to mariaDB in docker-compose-base.yml,but it still has error.so which configuration need to change together? 2025-06-23 15:16:37+08:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config command was: mysqld --max_connections=1000 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password --tls_version=TLSv1.2,TLSv1.3 --binlog_expire_logs_seconds=604800 --init-file /data/application/init.sql --verbose --help --log-bin-index=/tmp/tmp.TidPlyrSX0 2025-06-23 15:16:37 0 [Warning] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some options may be missing from the help text 2025-06-23 15:16:37 0 [Warning] 'default-authentication-plugin' is MySQL 5.6 / 5.7 compatible option. To be implemented in later versions. 2025-06-23 15:16:37 0 [ERROR] mysqld: unknown variable 'binlog_expire_logs_seconds=604800'

123hzx avatar Jun 23 '25 07:06 123hzx

Remove binlog_expire_logs_seconds in docker-compose-base.yaml.

KevinHuSh avatar Jun 24 '25 10:06 KevinHuSh

Remove this value, it still has error

2025-06-27 11:02:05 0 [ERROR] mysqld: Can't create/write to file '/var/data/init.sql' (Errcode: 2 "No such file or directory") 2025-06-27 11:02:05 0 [ERROR] Aborting Warning: Memory not freed: 272

This file has chown to mysql. -rwxr-xr-x. 1 mysql mysql 53 6月 23 17:13 init.sql

123hzx avatar Jun 27 '25 03:06 123hzx