Search code examples
ibm-clouddashboard

What is the way to connect ClearDb Mysql dashboard on Bluemix?


I created a ClearDb Mysql database on Bluemix. I got all the data to conect it but i can't do it.

I tried to use Squirrel and i always got a timeout connection. So i wanted to use the web interface but it asks me a login/password because the area seems restricted.

I got this message on popup :

A username and password are being requested by https://bluemix-eu-gb.marketplace.ibmcloud.com. The site says: "Restricted Site"

I tried to feed the fields with the data found to connect the db : it's failed. I also tried the login/password for Bluemix : failed too... I tried many other things but the good one.

Maybe i missed something when i created the DB or ... i don't know.

If anyone could give me the (obvious?) trick?


Solution

  • I used SQuirrel and it works fine for me to connect to the ClearDB MySQL database instance.

    Here are the steps I followed:

    1) Bound your ClearDB MySQL instance to an application (this is step is only needed so you can find your database credentials)

    2) In the Bluemix UI select the application you created above, this will open the application dashboard

    3) Locate the ClearDB MySQL instance tile and select the "Show Credentials" at the bottom of the tile. You should something similar to this (for privacy I changed ids and password below):

    {
      "cleardb": [
        {
          "name": "ClearDB MySQL Database-29",
          "label": "cleardb",
          "plan": "spark",
          "credentials": {
            "jdbcUrl": "jdbc:mysql://us-cdbr-iron-east-04.cleardb.net/DATABASENAME?user=USERNAME&password=PASSWORD",
            "uri": "mysql://USERNAME:[email protected]:3306/DATABASENAME?reconnect=true",
            "name": "DATABASENAME",
            "hostname": "us-cdbr-iron-east-04.cleardb.net",
            "port": "3306",
            "username": "USERNAME",
            "password": "PASSWORD"
          }
        }
      ]
    }
    

    4) Create the alias in SQuirrel and use the values above in the fields, please note that your server name could be different than mine:

    Name: MyAliasName
    Driver: MySQL Driver
    URL: jdbc:mysql://us-cdbr-iron-east-04.cleardb.net:3306/DATABASENAME
    User Name: USERNAME
    Password: PASSWORD
    

    5) Click Test button to check your connection. Everything should be fine.