Skip to content

docs(apisix): 从快速开始里去掉 MySQL,说明 Derby 默认配置 (#1087)#1101

Merged
Alanxtl merged 1 commit into
apache:mainfrom
Harry33t:docs/1087-apisix-mysql-clarify
May 10, 2026
Merged

docs(apisix): 从快速开始里去掉 MySQL,说明 Derby 默认配置 (#1087)#1101
Alanxtl merged 1 commit into
apache:mainfrom
Harry33t:docs/1087-apisix-mysql-clarify

Conversation

@Harry33t

@Harry33t Harry33t commented May 4, 2026

Copy link
Copy Markdown
Contributor

问题

nacos2.0.3-compose/docker-compose.yml 里设置的是 SPRING_DATASOURCE_PLATFORM=derby,MySQL
相关环境变量都是注释状态。所以在示例的运行路径下,Nacos 用的是内嵌 Derby完全不连 MySQL

但 README 仍然让用户:

# 启动 MySQL (Nacos 的数据库)
cd ../mysql5.7-compose
docker compose up -d
sleep 10

带来两个问题:

  • 用户白拉 MySQL 镜像、白等启动时间,拖慢上手流程
  • 文档让你启 MySQL,但实际配置又用 Derby,新人看了会困惑

修复

中英文 README 同步更新(不动代码、不动 compose 文件):

  • 把快速开始里的 MySQL 启动步骤和对应的 sleep 10 移除,让步骤跟配置实际所需的服务一致(etcd + Nacos + APISIX)
  • 加一段说明,解释 Nacos 用内嵌 Derby、mysql5.7-compose 目录保留作为生产级配置的参考,以及如何按需启用(启 MySQL + 取消 Nacos compose 里 MySQL
    环境变量的注释)

mysql5.7-compose 目录保留,希望用持久化存储的用户仍可使用。

Closes #1087


@Alanxtl

Alanxtl commented May 5, 2026

Copy link
Copy Markdown
Member

merge to main to fix ci fail

The Nacos compose file (`nacos2.0.3-compose/docker-compose.yml`) sets
`SPRING_DATASOURCE_PLATFORM=derby`, with the MYSQL_SERVICE_* vars
commented out. So in the demo path, Nacos uses its embedded Derby
store and does not connect to MySQL at all — yet the README still
asked users to start a MySQL container and `sleep 10`.

Two consequences:

- New users spend extra time pulling/booting MySQL for nothing,
  blocking the rest of the quick-start.
- It's confusing why both compose files coexist: the docs imply
  MySQL is required, the actual config says it isn't.

Update both English and Chinese READMEs:

- Remove the MySQL start step (and its `sleep 10`) from the
  quick-start sequence so the demo uses what the config actually
  expects (etcd + Nacos + APISIX).
- Add a short note explaining that Nacos uses embedded Derby, that
  the `mysql5.7-compose` directory is kept as a reference for
  production-like setups, and how to opt in (start MySQL + uncomment
  the env vars in the Nacos compose).

No code or compose-file changes; the MySQL compose is preserved
so users who want persistence can still use it.

Closes apache#1087
@Harry33t Harry33t force-pushed the docs/1087-apisix-mysql-clarify branch from 6dee851 to 1ef87b2 Compare May 9, 2026 14:24
@Alanxtl Alanxtl merged commit 5eb5746 into apache:main May 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[apisix] README 启动了 MySQL,但当前 Nacos 配置似乎使用 Derby,建议说明用途或简化部署

2 participants