在heroku上部署jhipster,远程mysql数据库不起作用

rggaifut  于 2021-07-08  发布在  Java
关注(0)|答案(1)|浏览(396)

我补充说 % 以及 %.eu-west-1.compute.amazonaws.com 在mysql服务器上的manage access主机上:

在运行这个命令之后:

git push heroku master

命令以如下错误结束:

remote: ----------------------------
remote: [INFO]     driver: com.mysql.jdbc.Driver
remote: [INFO]     url: jdbc:mysql://red.obambu.com:3306/dbName?useUnicode=true&characterEncoding=utf8&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC
remote: [INFO]     username: username
remote: [INFO]     password:*****
remote: [INFO]     use empty password: false
remote: [INFO]     properties file: null
remote: [INFO]     properties file will override? false
remote: [INFO]     prompt on non-local database? false
remote: [INFO]     clear checksums? false
remote: [INFO]     changeLogDirectory: null
remote: [INFO]     changeLogFile: src/main/resources/config/liquibase/master.xml
remote: [INFO]     context(s): null
remote: [INFO]     label(s): null
remote: [INFO]     number of changes to apply: 0
remote: [INFO]     drop first? false
remote: [INFO] ------------------------------------------------------------------------
remote: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD FAILURE
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time:  14.608 s
remote: [INFO] Finished at: 2020-08-21T14:36:52Z
remote: [INFO] ------------------------------------------------------------------------
remote: [ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.9.0:update (default-cli) on project test-aoo:
remote: [ERROR] Error setting up or running Liquibase:
remote: [ERROR] liquibase.exception.DatabaseException: java.sql.SQLException: Access denied for user 'username'@'ec2-11-111-111-11.eu-west-1.compute.amazonaws.com' (using password: YES)
remote: [ERROR] -> [Help 1]
remote: [ERROR]
remote: [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
remote: [ERROR] Re-run Maven using the -X switch to enable full debug logging.
remote: [ERROR]
remote: [ERROR] For more information about the errors and possible solutions, please read the following articles:
remote: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
remote: Waiting for release... failed.
To https://git.heroku.com/quiet-fjord-74508.git
   34d00e5..3ad885c  master -> master

n、 b:我的db密码是这样的: test@@123$$* 有人帮忙吗?

gev0vcfq

gev0vcfq1#

您应该从密码中删除@,或者用url中的%40替换它,以免与数据库url中的“@”混淆。例子:
之前:

jdbc:mysql://username:pass@word@localhost:3306/dbname

之后:

jdbc:mysql://username:pass%40word@localhost:3306/dbname

相关问题