Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在heroku上部署jhipster,远程Mysql数据库不工作_Java_Heroku_Deployment_Jhipster_Devops - Fatal编程技术网

Java 在heroku上部署jhipster,远程Mysql数据库不工作

Java 在heroku上部署jhipster,远程Mysql数据库不工作,java,heroku,deployment,jhipster,devops,Java,Heroku,Deployment,Jhipster,Devops,我在Mysql服务器上的Manage Access主机上添加了%和%.eu-west-1.compute.amazonaws.com,如下所示: 并在运行此命令后直接执行以下操作: git push heroku master cmd结束时出现如下错误: remote: ---------------------------- remote: [INFO] driver: com.mysql.jdbc.Driver remote: [INFO] url: jdbc:mysql

我在Mysql服务器上的Manage Access主机上添加了
%
%.eu-west-1.compute.amazonaws.com
,如下所示:

并在运行此命令后直接执行以下操作:

git push heroku master
cmd结束时出现如下错误:

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
注意:我的数据库密码是这样的:
test@@123$$*


有任何帮助吗?

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

之前:

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

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