Mysql JHipster从Hikari、liquibase、Springboot配置中抛出错误

Mysql JHipster从Hikari、liquibase、Springboot配置中抛出错误,mysql,spring-boot,jhipster,Mysql,Spring Boot,Jhipster,在使用MySQL数据库设置Jhipster microservice并首次在Intellij终端中运行后:Hikari、liquibase、Springboot配置会引发以下日志错误: ERROR 8353 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : Hikari - Exception during pool initialization. ERROR 8353 --- [ restartedMain] i

在使用MySQL数据库设置Jhipster microservice并首次在Intellij终端中运行后:Hikari、liquibase、Springboot配置会引发以下日志错误:

ERROR 8353 --- [  restartedMain] com.zaxxer.hikari.pool.HikariPool        : Hikari - Exception during pool initialization.
ERROR 8353 --- [  restartedMain] i.g.j.c.liquibase.AsyncSpringLiquibase   : Liquibase could not start correctly, your database is NOT read
ERROR 8353 --- [  restartedMain] com.zaxxer.hikari.pool.HikariPool        : Hikari - Exception during pool initialization.
ERROR 8353 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

此错误可能有很多原因,但在您的计算机中本地设置jHipster API gateway和jHipster Microservice后,请更改MySql数据库的用户名和密码。 因此,您必须首先使用root用户名打开mysql cli 并在终端中键入此命令:

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
此命令将为本地计算机创建新用户。记住将“newuser”和“password”更改为您想要使用的任何内容。 之后,您必须将完全权限授予用户,以便在终端中键入以下命令:

GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
记住将“newuser”更改为您在上一个命令中设置的任何值

在API网关应用程序中打开此文件:

src/main/resource/config/application-dev.yml

并更改此行:

    type: com.zaxxer.hikari.HikariDataSource
    url: jdbc:mysql://localhost:3306/JhipsterStarteruseUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&createDatabaseIfNotExist=true
username: root
password:
为此:

    type: com.zaxxer.hikari.HikariDataSource
    url: jdbc:mysql://localhost:3306/JhipsterStarter?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&createDatabaseIfNotExist=true
username: newuser
password: password