想配置halo使用服务器里的原有的Mysql数据库失败。
docker-compose.yaml文件:
version: "3"
services:
halo:
image: halohub/halo:2.9
container_name: halo
restart: on-failure:3
network_mode: "host"
volumes:
- ./:/root/.halo2
command:
- --spring.r2dbc.url=r2dbc:pool:mysql://localhost:3306/halo
- --spring.r2dbc.username=root
- --spring.r2dbc.password=123456
- --spring.sql.init.platform=mysql
- --halo.external-url=http://localhost:8090/
- --server.port=8090
docker-compose启动时报错:
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.b eans.factory.BeanCreationException: Error creating bean with name 'r2dbcScriptDatabaseInitializer' defined i n class path resource [org/springframework/boot/autoconfigure/sql/init/R2dbcInitializationConfiguration.class]: Failed to execute database script