0

I created the clear db for heroku app.

heroku config --app APP_NAME

I get these:

APPLICATION_SECRET:   ABCDEFG;

CLEARDB_DATABASE_URL: mysql://aaa:bbb@ccc.cleardb.net/heroku_ddd?reconnect=true
DATABASE_URL:         mysql://aaa:bbb@ccc.cleardb.net/heroku_ddd?reconnect=true

And I ran:

mysql -h aaa:bbb@ccc.cleardb.net -u ddd -p

And it requires the password that I don't know what it is. After I pushed "Enter", it says:

ERROR 2005 (HY000): Unknown MySQL server host 'aaa:bbb@ccc.cleardb.net' (0)

In the Play! application.conf file, the settings about the db are:

default.driver=com.mysql.jdbc.Driver
default.url = "jdbc:mysql://aaa:bbb@ccc.cleardb.net/heroku_ddd?reconnect=true&characterEncoding=UTF8"

How should I fix the error, connect to the cleardb and start doing some sql expressions?

이국화
  • 809
  • 1
  • 9
  • 8
  • You get this error from the `mysql` CLI but not from your app, correct? – codefinger Dec 02 '16 at 14:16
  • in your demo example, in the CLEARDB_DATABASE_URL variable, the server host part is between the @ and the slash: "ccc.cleardb.net". check this post for more info: http://stackoverflow.com/questions/9822313/remote-connect-to-cleardb-heroku-database – Eran.E Jan 05 '17 at 19:40

0 Answers0