英文:
deploying jhipster on heroku with remote Mysql db not working
问题
我在我的MySQL服务器上的"管理访问主机"中添加了%
和%.eu-west-1.compute.amazonaws.com
,就像这样:
在运行了以下命令之后:
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
注意:我的数据库密码类似于test@@123$$*
。
有什么帮助吗?
英文:
i have added %
and %.eu-west-1.compute.amazonaws.com
on my Manage Access Hosts on Mysql server like that :
and directly after running this cmd :
git push heroku master
the cmd end with an error like that:
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 : my db password is something like that : test@@123$$*
any help guys ?
答案1
得分: 2
你应该从密码中移除 @ 或者将其在你的URL中替换为 %40,以免与数据库URL中的 '@' 混淆。示例:
修改前:
jdbc:mysql://username:pass@word@localhost:3306/dbname
修改后:
jdbc:mysql://username:pass%40word@localhost:3306/dbname
英文:
You should remove @ from password or replace it with %40 in your URL to not confuse with the '@' in your database URL. example :
before :
jdbc:mysql://username:pass@word@localhost:3306/dbname
after :
jdbc:mysql://username:pass%40word@localhost:3306/dbname
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论