Question

I am trying to insert data into a cloudfoundry mysql database as follows:

vmc tunnel myapp --port 10000 mysql

Then:

mysql> source /home/julien/Documents/donnees/projets/Site-Rencontres/java/src/main/resources/misc/sql/geolocation.sql
ERROR 1142 (42000): INSERT command denied to user 'udYra*****'@'172.30.*.*' for table 'geolocation'

What strikes me is that the user I retrieved using java.lang.System.getenv("VCAP_SERVICES"); is different from the one above:

"user":"ukqM8******"

My question is twofold:

  1. How can I prepopulate the cloudfoundry database with data?
  2. Why is the above user different from the one I retrieved from the VCAP_SERVICES env variable?

EDIT: I was able to succefully connect to mysql using vmc tunnel's none option and then pointing to port 10000 from the mysql client. I am now running into mysql privileges issues and I opened another thread here on SO.

Was it helpful?

Solution

The reason the users are different is that Caldecott uses a different binding to the application where you inspected VCAP_SERVICES.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top