diff --git a/docs/getting-started/install/docker-compose.md b/docs/getting-started/install/docker-compose.md index 7b78639e..2164327b 100644 --- a/docs/getting-started/install/docker-compose.md +++ b/docs/getting-started/install/docker-compose.md @@ -226,6 +226,14 @@ import DockerRegistryList from "./slots/_docker-registry-list.md" # 端口号 默认8090 - --server.port=8090 ``` + + :::info + 使用外部数据库时,需要提前手动创建好数据库,以 MySQL 为例: + + ```sql + create database halo character set utf8mb4 collate utf8mb4_bin; + ``` + ::: diff --git a/docs/getting-started/install/jar-file.md b/docs/getting-started/install/jar-file.md index a1f7dd95..7829290b 100644 --- a/docs/getting-started/install/jar-file.md +++ b/docs/getting-started/install/jar-file.md @@ -110,26 +110,31 @@ title: 使用 JAR 文件部署 数据库配置说明: - | 参数名 | 描述 | - |----------------------------|-------------------------------------------------------| - | `spring.r2dbc.url` | 数据库连接地址,详细可查阅下方的 `配置对应关系` | - | `spring.r2dbc.username` | 数据库用户名 | - | `spring.r2dbc.password` | 数据库密码 | + | 参数名 | 描述 | + | -------------------------- | ----------------------------------------------------------- | + | `spring.r2dbc.url` | 数据库连接地址,详细可查阅下方的 `配置对应关系` | + | `spring.r2dbc.username` | 数据库用户名 | + | `spring.r2dbc.password` | 数据库密码 | | `spring.sql.init.platform` | 数据库平台名称,支持 `postgresql`、`mysql`、`mariadb`、`h2` | 配置对应关系: | 链接方式 | 链接地址格式 | `spring.sql.init.platform` | - |-------------|------------------------------------------------------------------------------------|----------------------------| + | ----------- | ---------------------------------------------------------------------------------- | -------------------------- | | PostgreSQL | `r2dbc:pool:postgresql://{HOST}:{PORT}/{DATABASE}` | postgresql | | MySQL | `r2dbc:pool:mysql://{HOST}:{PORT}/{DATABASE}` | mysql | - | MariaDB | `r2dbc:pool:mariadb://{HOST}:{PORT}/{DATABASE}` | mariadb | + | MariaDB | `r2dbc:pool:mariadb://{HOST}:{PORT}/{DATABASE}` | mariadb | | H2 Database | `r2dbc:h2:file:///${halo.work-dir}/db/halo-next?MODE=MySQL&DB_CLOSE_ON_EXIT=FALSE` | h2 | :::info - HOST:数据库服务地址,如 `localhost` - PORT:数据库服务端口,如 `3306` - - DATABASE:数据库名称,如 `halo`,需要提前创建 + - DATABASE:数据库名称,如 `halo`,需要提前创建,以 MySQL 为例: + + ```sql + create database halo character set utf8mb4 collate utf8mb4_bin; + ``` + ::: :::warning diff --git a/docusaurus.config.js b/docusaurus.config.js index 29aa6849..fd9564ad 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -189,7 +189,7 @@ const config = { prism: { theme: darkCodeTheme, darkTheme: darkCodeTheme, - additionalLanguages: ["java"], + additionalLanguages: ["java","sql"], }, zoom: { selector: ".markdown :not(a) > img", diff --git a/versioned_docs/version-2.20/getting-started/install/docker-compose.md b/versioned_docs/version-2.20/getting-started/install/docker-compose.md index 7b78639e..2164327b 100644 --- a/versioned_docs/version-2.20/getting-started/install/docker-compose.md +++ b/versioned_docs/version-2.20/getting-started/install/docker-compose.md @@ -226,6 +226,14 @@ import DockerRegistryList from "./slots/_docker-registry-list.md" # 端口号 默认8090 - --server.port=8090 ``` + + :::info + 使用外部数据库时,需要提前手动创建好数据库,以 MySQL 为例: + + ```sql + create database halo character set utf8mb4 collate utf8mb4_bin; + ``` + ::: diff --git a/versioned_docs/version-2.20/getting-started/install/jar-file.md b/versioned_docs/version-2.20/getting-started/install/jar-file.md index a1f7dd95..7829290b 100644 --- a/versioned_docs/version-2.20/getting-started/install/jar-file.md +++ b/versioned_docs/version-2.20/getting-started/install/jar-file.md @@ -110,26 +110,31 @@ title: 使用 JAR 文件部署 数据库配置说明: - | 参数名 | 描述 | - |----------------------------|-------------------------------------------------------| - | `spring.r2dbc.url` | 数据库连接地址,详细可查阅下方的 `配置对应关系` | - | `spring.r2dbc.username` | 数据库用户名 | - | `spring.r2dbc.password` | 数据库密码 | + | 参数名 | 描述 | + | -------------------------- | ----------------------------------------------------------- | + | `spring.r2dbc.url` | 数据库连接地址,详细可查阅下方的 `配置对应关系` | + | `spring.r2dbc.username` | 数据库用户名 | + | `spring.r2dbc.password` | 数据库密码 | | `spring.sql.init.platform` | 数据库平台名称,支持 `postgresql`、`mysql`、`mariadb`、`h2` | 配置对应关系: | 链接方式 | 链接地址格式 | `spring.sql.init.platform` | - |-------------|------------------------------------------------------------------------------------|----------------------------| + | ----------- | ---------------------------------------------------------------------------------- | -------------------------- | | PostgreSQL | `r2dbc:pool:postgresql://{HOST}:{PORT}/{DATABASE}` | postgresql | | MySQL | `r2dbc:pool:mysql://{HOST}:{PORT}/{DATABASE}` | mysql | - | MariaDB | `r2dbc:pool:mariadb://{HOST}:{PORT}/{DATABASE}` | mariadb | + | MariaDB | `r2dbc:pool:mariadb://{HOST}:{PORT}/{DATABASE}` | mariadb | | H2 Database | `r2dbc:h2:file:///${halo.work-dir}/db/halo-next?MODE=MySQL&DB_CLOSE_ON_EXIT=FALSE` | h2 | :::info - HOST:数据库服务地址,如 `localhost` - PORT:数据库服务端口,如 `3306` - - DATABASE:数据库名称,如 `halo`,需要提前创建 + - DATABASE:数据库名称,如 `halo`,需要提前创建,以 MySQL 为例: + + ```sql + create database halo character set utf8mb4 collate utf8mb4_bin; + ``` + ::: :::warning