I am trying to deploy a sample web-app (JSP based) which uses MySQL DB. I have been able to deploy it (using liberty profile) and bind MySQL service to it. No problems this far.
Now i want to setup the DB with the tables and master data using an already available script. I am trying to connect to MySQL DB BlueMix service using mysql command line interface, and the details exposed by VCAP_SERVICES environment variable, using - "mysql --host=$host --port=$port --user=$user --password=$pass --database=$dbname" (furnishing variables values as indicated in VCAP_SERVICES).
I am not able to connect. Getting the following error - ERROR 2003 (HY000): Can't connect to MySQL server on '$host' (60).
Has anyone faced a similar issue? If so how do i go about fixing / working-around it. My intentions is to be able to leverage the MySQL db set script that i have and run it on the BlueMix provisioned database.
As an aside, I was able to install phpmyadmin as a BlueMix app and bind to the same MySQL instance as my test php app, using this update in git: https://github.com/dmikusa-pivotal/cf-ex-phpmyadmin
I only kicked the tires on this and cannot comment on whether this will fully address your issue.
The ability to address the URL of your service is a known-requirement and while I cannot comment on when that might be available, the lack of cf tunnel in the new cf command will probably make this a more important requirement. This would allow you to connect a remote tool theoretically.
I do think @Millard is on the right track, BlueMix is likely to focus on the IBM value added services initially at any rate -- the ability to use admin tools is a QoS of plan of the service you are binding.
If you are using cf V5 command line, tunnel still exists. Note tunnel is not supported in cf V6 command line.
>cf tunnel 1: JSONDB-fsjes 2: mongodb-tia-node-amnt 3: mysql-ch7kn Which service instance?> 3
1: none 2: mysql 3: mysqldump Which client would you like to start?>
For cf v6 or later, probably, we will recommend to run command line during "cf push". See the guideline below in cloud foundry foundation documents.:
Take a look at this JazzHub project from Pankaj that explains how to deploy phpadmin https://hub.jazz.net/project/pdhoolia/phpMyAdmin/overview
Have you considered using the IBM SQLDB service at BlueMix? While many of the community supported services (MongoDB, MySQL, PostreSQL, etc.) don't have available console options for administration, most of the IBM supported ones do: https://www.ng.bluemix.net/docs/Services/SQLRDB/SQLDB.html
And if you are concerned with compatibility and your local development, DB2 Community Edition is free to download and use: http://www-01.ibm.com/software/data/db2/express-c/download.html
For the most part, SQL should be SQL and this path provides a little less resistance at this point. Alternatively, I guess you could try to stand up PHP MyAdmin for MySQL as a BlueMix app. I have no idea if we plan to offer such support.
Have added a project@JazzHub for myPhpAdmin application.
To bootstrap MySQL service instances one can now - Fork, modify manifest.yml, deploy to BlueMix, and add MySQL service instances to this app. This app can handle multiple MySQL instances. More in the README.md
Error creating Bluemix service 2 Answers