部署方式Docker compose
btnethalodb-1 | 2025-07-04 22:49:46+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.1.0-1.el8 started.
btnethalodb-1 | 2025-07-04 22:49:47+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
btnethalodb-1 | 2025-07-04 22:49:47+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.1.0-1.el8 started.
btnethalodb-1 | 2025-07-04 22:49:48+00:00 [Note] [Entrypoint]: Initializing database files
btnethalodb-1 | 2025-07-04T22:49:48.263454Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
halo_tZ5N-1 |
halo_tZ5N-1 | __ __ __
halo_tZ5N-1 | / / / /___ _/ /___
halo_tZ5N-1 | / /_/ / __
/ / __ \
halo_tZ5N-1 | / __ / // / / // /
halo_tZ5N-1 | // //_,//___/
halo_tZ5N-1 |
halo_tZ5N-1 | Version: 2.20.21
halo_tZ5N-1 | 2025-07-05T06:50:42.744+08:00 INFO 7 --- [ main] run.halo.app.Application : Starting Application v2.20.21 using Java 21.0.7 with PID 7 (/application/BOOT-INF/classes started by root in /application)
halo_tZ5N-1 | 2025-07-05T06:50:42.748+08:00 INFO 7 --- [ main] run.halo.app.Application : No active profile set, falling back to 1 default profile: "default"
halo_tZ5N-1 | 2025-07-05T06:50:55.050+08:00 INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
halo_tZ5N-1 | 2025-07-05T06:50:55.053+08:00 INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data R2DBC repositories in DEFAULT mode.
halo_tZ5N-1 | 2025-07-05T06:50:56.537+08:00 INFO 7 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 1394 ms. Found 1 R2DBC repository interface.
halo_tZ5N-1 | 2025-07-05T06:51:12.045+08:00 INFO 7 --- [ main] r.h.a.s.a.impl.RsaKeyService : Generating RSA keys for PAT.
halo_tZ5N-1 | 2025-07-05T06:51:23.337+08:00 INFO 7 --- [ main] r.h.a.s.a.impl.RsaKeyService : Wrote RSA keys for PAT into /root/.halo2/keys/pat_id_rsa and /root/.halo2/keys/pat_id_rsa.pub
halo_tZ5N-1 | 2025-07-05T06:51:24.956+08:00 INFO 7 --- [ main] org.pf4j.DefaultPluginStatusProvider : Enabled plugins: []
halo_tZ5N-1 | 2025-07-05T06:51:24.958+08:00 INFO 7 --- [ main] org.pf4j.DefaultPluginStatusProvider : Disabled plugins: []
halo_tZ5N-1 | 2025-07-05T06:51:24.961+08:00 INFO 7 --- [ main] org.pf4j.DefaultPluginManager : PF4J version 3.13.0 in 'deployment' mode
btnethalodb-1 | 2025-07-04T22:49:48.265022Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
btnethalodb-1 | 2025-07-04T22:49:48.265126Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.1.0) initializing of server in progress as process 80
btnethalodb-1 | 2025-07-04T22:49:48.277927Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
btnethalodb-1 | 2025-07-04T22:49:50.699866Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
btnethalodb-1 | 2025-07-04T22:49:54.253676Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
btnethalodb-1 | 2025-07-04T22:50:04.379133Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
btnethalodb-1 | 2025-07-04 22:50:04+00:00 [Note] [Entrypoint]: Database files initialized
btnethalodb-1 | 2025-07-04 22:50:04+00:00 [Note] [Entrypoint]: Starting temporary server
btnethalodb-1 | 2025-07-04T22:50:04.454284Z 0 [System] [MY-015015] [Server] MySQL Server - start.
btnethalodb-1 | 2025-07-04T22:50:05.057749Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
btnethalodb-1 | 2025-07-04T22:50:05.059566Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.1.0) starting as process 152
btnethalodb-1 | 2025-07-04T22:50:05.156944Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
btnethalodb-1 | 2025-07-04T22:50:06.735201Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
btnethalodb-1 | 2025-07-04T22:50:08.138435Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
btnethalodb-1 | 2025-07-04T22:50:08.138479Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
btnethalodb-1 | 2025-07-04T22:50:08.146013Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
btnethalodb-1 | 2025-07-04T22:50:08.241232Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
btnethalodb-1 | 2025-07-04T22:50:08.241311Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.1.0' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.
btnethalodb-1 | 2025-07-04T22:50:08.246121Z 0 [System] [MY-015016] [Server] MySQL Server - end.
btnethalodb-1 | 2025-07-04 22:50:08+00:00 [Note] [Entrypoint]: Temporary server started.
btnethalodb-1 | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
btnethalodb-1 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
btnethalodb-1 | Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
btnethalodb-1 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
btnethalodb-1 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
btnethalodb-1 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
btnethalodb-1 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
btnethalodb-1 | 2025-07-04 22:50:17+00:00 [Note] [Entrypoint]: Creating database halo
btnethalodb-1 |
btnethalodb-1 | 2025-07-04 22:50:17+00:00 [Note] [Entrypoint]: Stopping temporary server
btnethalodb-1 | 2025-07-04T22:50:17.941535Z 11 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.1.0).
btnethalodb-1 | 2025-07-04T22:50:20.841479Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.1.0) MySQL Community Server - GPL.
btnethalodb-1 | 2025-07-04 22:50:20+00:00 [Note] [Entrypoint]: Temporary server stopped
btnethalodb-1 |
btnethalodb-1 | 2025-07-04 22:50:20+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
btnethalodb-1 |
btnethalodb-1 | 2025-07-04T22:50:21.045758Z 0 [System] [MY-015015] [Server] MySQL Server - start.
btnethalodb-1 | 2025-07-04T22:50:22.734534Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
btnethalodb-1 | 2025-07-04T22:50:22.807951Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.1.0) starting as process 1
btnethalodb-1 | 2025-07-04T22:50:22.987843Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
btnethalodb-1 | 2025-07-04T22:50:26.013376Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
btnethalodb-1 | 2025-07-04T22:50:28.537781Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
btnethalodb-1 | 2025-07-04T22:50:28.537814Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
btnethalodb-1 | 2025-07-04T22:50:28.549684Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
btnethalodb-1 | 2025-07-04T22:50:29.036847Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
btnethalodb-1 | 2025-07-04T22:50:29.036937Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.1.0' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
btnethalodb-1 | 2025-07-04T22:50:29.845697Z 0 [System] [MY-015016] [Server] MySQL Server - end.配置文件如下
services:
halo_tZ5N:
image: registry.fit2cloud.com/halo/halo:${VERSION}
restart: on-failure:3
depends_on:
btnethalodb:
condition: service_healthy
volumes:
- ${APP_PATH}/data/halo2:/root/.halo2
ports:
- ${HOST_IP}:${HTTP_PORT}:8090
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
environment:
JVM 参数,默认为 -Xmx256m -Xms256m,可以根据实际情况做调整,置空表示不添加 JVM 参数
- JVM_OPTS=-Xmx256m -Xms256m
command:
- --spring.r2dbc.url=r2dbc:pool:mysql://btnethalodb:3306/halo
- --spring.r2dbc.username=root
MySQL 的密码,请保证与下方 MYSQL_ROOT_PASSWORD 的变量值一致。
- --spring.r2dbc.password=oGDwN7JSa56
- --spring.sql.init.platform=mysql
外部访问地址,请根据实际需要修改
- --halo.external-url=${OUTER_ADDR}:${HTTP_PORT}/
labels:
createdBy: "bt_apps"
networks:
- baota_net
btnethalodb:
image: mysql:8.1.0
restart: on-failure:3
command:
- --default-authentication-plugin=caching_sha2_password
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
- --explicit_defaults_for_timestamp=true
volumes:
- ${APP_PATH}/data/mysql:/var/lib/mysql
- ${APP_PATH}/data/mysqlBackup:/data/mysqlBackup
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"]
interval: 3s
retries: 5
start_period: 30s
environment:
请修改此密码,并对应修改上方 Halo 服务的 SPRING_R2DBC_PASSWORD 变量值
- MYSQL_ROOT_PASSWORD=oGDwN7JSa56
- MYSQL_DATABASE=halo
labels:
createdBy: "bt_apps"
networks:
- baota_net
networks:
baota_net:
external: true`