Access the Turbonomic Database from Outside the Instance

Document created by robert.fagnoni Expert on Jan 17, 2017Last modified by robert.fagnoni Expert on May 16, 2019
Version 13Show Document
  • View in full screen mode

By default you are unable to access the Turbonomic database unless you are on the instance or connecting through an SSH tunnel.  This can changed so that you are able to access the database through your own code base or using a application.

Here are the steps for opening that connection:

  1. The first thing you need to do is update the database's configuration so that it allows connections outside of the local instance.
    1. Create a backup of the configuration file:
      cp /etc/my.cnf.d/bind-addr.cnf /etc/my.cnf.d/bind-addr.cnf.BACKUP
    2. Open the configuration file:
      vim /etc/my.cnf.d/bind-addr.cnf
    3. Search for the line:
    4. Replace that line with:
    5. Exit the file:
    6. Restart the mysql service:
      service mariadb restart
  2. The last step is to create a new user that you will be connecting with (Put your username in <username> and your password in <password>)
    1. Access the database
      mysql -uroot -p<root database password> mysql
    2. Create a user:
      CREATE USER '<username>'@'%' IDENTIFIED BY '<password>';
    3. Give the user privileges:
      GRANT SELECT on vmtdb.* to <username>@'%' IDENTIFIED BY '<password>';
      GRANT EXECUTE on vmtdb.* to <username>@'%' IDENTIFIED BY '<password>';
      GRANT SHOW VIEW on vmtdb.* to <username>@'%' IDENTIFIED BY '<password>';
    4. Reload the privileges:

At this point you will be able to login to the database with your new user from outside of the Turbonomic instance.