Access the Turbonomic Database from Outside the Instance

Document created by robert.fagnoni Expert on Jan 17, 2017Last modified by robert.fagnoni Expert on Dec 6, 2017
Version 10Show 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.

STEP 3 is for OpenSuSE only, STEP 1 and 2 are for both OpenSuSE and CentOS.


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/turbo.cnf /etc/my.cnf.d/turbo.cnf.BACKUP
    2. Open the configuration file:
      vim /etc/my.cnf.d/turbo.cnf
    3. Search for the line:
      bind_address=127.0.0.1
    4. Replace that line with:
      bind_address=0.0.0.0
    5. Exit the file:
      :wq!
    6. Restart the mysql service:
      OpenSuSE - service mysql restart
      CentOS - 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:
      FLUSH PRIVILEGES;
  3. [OpenSuSE ONLY] The next thing to do is update the firewall to allow the connection
    1. Create a backup of the configuration file:
      cp /etc/sysconfig/SuSEfirewall2 /etc/sysconfig/SuSEfirewall2.org
    2. Open the configuration file:
      vim /etc/sysconfig/SuSEfirewall2
    3. Search for the line:
      FW_CONFIGURATIONS_EXT=""
    4. Add "mysql" to that line:
      FW_CONFIGURATIONS_EXT="mysql"
    5. Exit the file:
      :wq!
    6. Restart the firewall service:
      service SuSEfirewall2 restart

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

3 people found this helpful

Attachments

    Outcomes